Skip to main content

SwingFrame, Frame, Stage, CustomNode, what is the best foundation?

3 replies [Last post]
zeusviper
Offline
Joined: 2008-04-28
Points: 0

Hi,
when I look toward the different javaFx examples, I see different methods to create some javaFx app.

By example, the StockWatcher app declare a widget which contains itself (? widget.frame.stage.content = [widget]; ? ) and widget is an object which inherit from CustomNode. A frame is declared in this widget.

The WeatherApp declare directly a Frame and use the Runnable java interface.

The SmokeParticleSystem use only a Frame.

Some others app use only a SwingFrame.

So, the questions are :
What are the differences? What's the best to use? When choose a system and not another?

Thanks for your helps!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12
Points: 0
zeusviper
Offline
Joined: 2008-04-28
Points: 0

Hi and thanks for the answer!

it answers to the SwingFrame question which will become deprecated.

But what about the others cases?

These examples are the standards ones given by Sun. Why do they not apply same principles for their apps?

alexsch
Offline
Joined: 2007-07-12
Points: 0

I think that finally only javafx.application.Application class will be used for all cases.

But it is not implemented yet. See:
JFXC-1256 Run Application class as a standalone application
http://openjfx.java.sun.com/jira/browse/JFXC-1256