Results 1 to 3 of 3
  1. #1
    JavaPete is offline Member
    Join Date
    Oct 2012
    Rep Power

    Default JavaFX 2.0 and/or Swing

    Are these completey different GUI modules in which I should attack for example Swing and then move on to FX ?
    I want to approach learning JAVA taking a proper learning path. Thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default Re: JavaFX 2.0 and/or Swing

    Most important -- code using the MVC paradigm, so that regardless of which GUI library you use, your models will all be pretty close to being library-agnostic. As for which to choose, I can't help you as I am not that familiar with JavaFX.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: JavaFX 2.0 and/or Swing

    If you're just starting in GUIs, I would recommend JavaFX, primarily because Swing has been declared to be in maintenance mode, which means no new API (and quite possibly a low priority of fixing reported bugs).

    JavaFX and Swing can be combined in the same GUI, but the programming to ensure that Swing code runs on the EDT and FX code in the Application Thread isn't pretty.

    IMO the two biggest drawbacks in the present FX API are (1) lack of a Spinner component and (2) no public API for saving FX image types or converting them to AWT image types. Both of these are fully expected to be addressed in the near future (or might be already addressed, I haven't consulted the API for the very latest release).

    Apart from that, I agree with Fubarable about learning and following the MVC paradigm. You may still need to create different models for Swing and FX, as FX makes good use of the Collections framework which didn't exist when Swing was created, and is also fully genericised, unlike Swing where only in Java 7 did a smattering of generics appear (JList, ListModel and JComboBox).

    As this isn't a question about AWT/Swing programming, I shall move it to the Forum Lobby.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. How to use multiple windows in javafx 2
    By mDennis10 in forum JavaFX
    Replies: 0
    Last Post: 08-04-2012, 05:39 PM
  2. Help with javaFX?!
    By JavaNoob!1 in forum JavaFX
    Replies: 7
    Last Post: 07-18-2012, 10:56 PM
  3. JAVAFX 2.0 popup menu
    By bockymurphy in forum JavaFX
    Replies: 0
    Last Post: 01-12-2012, 02:10 AM
  4. Mysql and JavaFX
    By cjr9968 in forum JDBC
    Replies: 11
    Last Post: 01-29-2010, 02:51 AM
  5. JavaFX Script and JavaFX Mobile
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-27-2010, 04:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts