Results 1 to 8 of 8
  1. #1
    such orb is offline Member
    Join Date
    Mar 2012
    Posts
    24
    Rep Power
    0

    Default how to convert a java project into a javafx project?

    i have an existing java swing app/gui. i want to add some javafx functionality to the said project. things like JFXPanels and so on... when i try to add a JFXPanel, i get errors and the code doesn't work. what i am asking is; should i restart with a dedicated javafx project and copy/paste code? can i do that quite easily?

    thanks!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,937
    Rep Power
    16

    Default Re: how to convert a java project into a javafx project?

    Since a 'project' is a feature of certain IDEs and not of the Java language or platform, I have to ask whether this question is about programming or about a specific IDE.

    JavaFX 2 *is* a Java API. JavaFX 2 code *is* Java code.

    when i try to add a JFXPanel, i get errors
    Be specific. What errors? What are the error messages? We're not mind readers here.

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

  3. #3
    such orb is offline Member
    Join Date
    Mar 2012
    Posts
    24
    Rep Power
    0

    Default Re: how to convert a java project into a javafx project?

    hi,

    i am using netbeans 7.2.1 and the jdk 7 update 9. i have ben trying javaFX scene builder 1.0, too. that creates FXML files/classes. do javaFX programs only utilize one FX main class and all other classes are standard java classes?

    the errors... if i type this:

    JFXPanel testPanel = new JFXPanel();

    well, then i get the entered text underlined in red and a cannot-find-symbol error. i have tried changing settings on the Java Platform Manager, but, to no avail. on the JavaFx tab, what should be in the JavaFX Sources field? i have this:

    Program Files\Java\jdk1.7.0_09

    on a dedicated JavaFX program, everything is ok and all works fine. so, how do i combine Java and JavaFX in one program? i need to adjust libraries and/or JARs?

    thank you

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,937
    Rep Power
    16

    Default Re: how to convert a java project into a javafx project?

    So this is a NetBeans question rather than a JavaFX question.

    Project -> Properties -> Libraries -> Add Library -> Java FX 2 Runtime for Windows

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,937
    Rep Power
    16

    Default Re: how to convert a java project into a javafx project?

    Moved from JavaFX

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

  6. #6
    such orb is offline Member
    Join Date
    Mar 2012
    Posts
    24
    Rep Power
    0

    Default Re: how to convert a java project into a javafx project?

    hello,

    thanks for your reply. i can't find the Java FX 2 Runtime for Windows library in the libraries window. it has everything but what i am looking for... could it have a different title?

    however, i started a new dedicated JavaFX project and the JFXPanel workls fine in that. so it's best to just use all-out JavaFX projrects?

    thanks

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,937
    Rep Power
    16

    Default Re: how to convert a java project into a javafx project?

    Quote Originally Posted by such orb View Post
    i can't find the Java FX 2 Runtime for Windows library in the libraries window.
    Did you click the Add Library button?

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

  8. #8
    such orb is offline Member
    Join Date
    Mar 2012
    Posts
    24
    Rep Power
    0

    Default Re: how to convert a java project into a javafx project?

    Hi,

    i did try the Add Library button but no JavaFX Runtime options were available.

    well, i have got it working now... i added the jfxrt.jar in my c: drive java folder to the project libraries compile tab - and it works! would you recommend adding any other similar jars to the project?

    ok :)

Similar Threads

  1. Creating a project in eclipse from existing project
    By Suraiya in forum New To Java
    Replies: 1
    Last Post: 10-08-2011, 09:14 AM
  2. How to convert from Ant project to maven project?
    By jiapei100 in forum New To Java
    Replies: 0
    Last Post: 06-08-2011, 10:01 AM
  3. Convert project from JRE1.6 to 1.5
    By PLM_Admin in forum Eclipse
    Replies: 0
    Last Post: 01-12-2011, 09:07 PM
  4. convert please...to finish project
    By syedabu in forum Web Frameworks
    Replies: 1
    Last Post: 02-24-2010, 07:17 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
  •