Posts

Showing posts from May, 2016

Differences between JavaFX and Swing

NOTE : Oracle hasn't completely abandoned Swing — it isn't deprecated, and Swing applications continue to work. But no work is being done anymore to enhance Swing, and Oracle has made it clear that JavaFX is the future. Here are ten basic differences between JavaFX and Swing. In JavaFX, all the world's a stage In Swing, the class that holds your user interface components is called a frame and is defined by the JFrame class. A frame is essentially an empty window to which you can add a panel, which serves as a container for your user-interface elements. A panel is defined by the JPanel class. A Swing application is actually a class that extends the JFrame class. To display user-interface components, you add components to a JPanel and then add the panel to the frame. JavaFX uses the metaphor of a theater to model the top-level containers of an application. A stage (defined by the Stage class) represents the highest level container — ty