Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should we still teach Swing?

 
Campbell Ritchie
Sheriff
Posts: 51423
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
… or has JavaFX superseded it?
 
Hendrik Ebbers
author
Ranch Hand
Posts: 32
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
for all new projects I would use JavaFX. With Java 8 it is official the recommended UI Toolkit for Java. If you have big applications that are implemented with Swing you can't simple change to JavaFX. In this case a migration is the best workflow. JavaFX supports Swing integration and migration: http://docs.oracle.com/javafx/2/swing/jfxpub-swing.htm
 
Campbell Ritchie
Sheriff
Posts: 51423
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you

Does your book explain anything about installing JavaFX, or does it come with the usual JDK installation_
 
Campbell Ritchie
Sheriff
Posts: 51423
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hendrik Ebbers wrote: . . . With Java 8 it is official the recommended UI Toolkit for Java. . . .
It would have been nice to have FX included in the Java® Tutorials, then.
 
Hendrik Ebbers
author
Ranch Hand
Posts: 32
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can find some official JavaFX Tutorials here: http://docs.oracle.com/javase/8/javase-clienttechnologies.htm

Since Java 8 JavaFX is part of the JDK and JRE and it's in the classpath. So you don't need any specials tools or IDEs
 
Campbell Ritchie
Sheriff
Posts: 51423
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank yoiu. I had seen that tutorial but thought it was only for use with NetBeans. Now I have read it properly, I shall have to get those samples.
 
John Damien Smith
Ranch Hand
Posts: 299
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the student wants to:
Build apps based upon the NetBeans platform, write plugins for Intellij Idea or enhance or work with an existing framework which is built in Swing:
=> learn Swing
Build new Java client applications which do not use any of the existing Swing frameworks:
=> learn JavaFX
 
Jim Venolia
Ranch Hand
Posts: 248
2
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sunuvabiatch. Google brought me here. I've almost got my first Swing program running, and now I find Swing is obsolete?

Java newbie here, 35 years programming experience. Should I learn JavaFX or stick with Swing? My ultimate goal is to target Android, for now I'm trying to learn the Java libraries.

I don't even know what netbeans nor intellij are......
 
John Damien Smith
Ranch Hand
Posts: 299
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim, if your goal is only Android development, then learn that, not Swing or JavaFX. Swing apps won't run on Android (as far as I know). JavaFX apps might work on Android if you use JavaFX ports. Not many people currently develop Android applications with JavaFX, they usually develop them with the Android toolkit provided by Google or some other system such as Unity. I'd really only advise targeting JavaFX for Android development if you have quite a bit of experience in Java and JavaFX development.

Idea and NetBeans are integrated development environments for many languages and software frameworks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic