paulszefer / Ecosystem-Simulation

MIT License
0 stars 0 forks source link

Swing GUI vs. JavaFX GUI #3

Open paulszefer opened 7 years ago

paulszefer commented 7 years ago

The basic layout of the GUI using Swing: image

The basic layout of the GUI using JavaFX: image

The improved JavaFX GUI: image

chris-thompson commented 7 years ago

Which did you find faster or easier to work with?

paulszefer commented 7 years ago

It took a bit of time to learn the structure of JavaFX, but once I got going, JavaFX felt easier to work with.

chris-thompson commented 7 years ago

I think moving from Swing to FX is a good idea. I think it makes sense. An application contains a stage. A stage contains one or more scenes. Scenes essentially contain node graphs. It's all very logical to me! I also like how we have 3 different ways to attach listeners to event generators. I think lambda is lovely.

paulszefer commented 7 years ago

JavaFX's layout system feels similar to that of HTML, which has let me tap into webpage layout concepts to make it easier to understand. It was also much easier to understand how to manipulate a Grid Pane than the GridBagLayout that I was fiddling with in Swing.