• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is JavaFX only for internet applications?

 
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems wherever I read about it it talks about RIA(Rich Internet Applications) so is this all it does? I was reading on here it's going to replace swing? Does that mean it's a better gui builder than swing? Is the code java code, or is it different? I know there was JFX Script which was 1.0 I believe, and now 2.0 is in the API, so I would assume it's just normal Java code?
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jay Orsaw wrote:It seems wherever I read about it it talks about RIA(Rich Internet Applications) so is this all it does?


No. Have you taken a look at the documentation and samples linked from that page?

Jay Orsaw wrote:I was reading on here it's going to replace swing?


Where?

Jay Orsaw wrote:Does that mean it's a better gui builder than swing?


Depends what exactly you mean by a "GUI builder" -- JavaFX does have a superior rendering engine, various Effects and then there's FXML for specifying a JavaFX user interface through XML.

Jay Orsaw wrote:Is the code java code, or is it different?


It's Java code. Java, as pertaining to the programming language and platform, is a proper noun.

Jay Orsaw wrote:I know there was JFX Script which was 1.0 I believe, and now 2.0 is in the API, so I would assume it's just normal Java code?


Correct, except that there was never any JFX Script that I was aware of. There was JavaFX Script.

 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaFX may not be replacing right away. But much of the development efforts would be focussed on JavaFX - that's what all the reports from Javaone 2011 stated.
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah i was reading the documents and such, i believe it did say desktop application somewhere. I kind of answered most of my questions by reading around, but to add to what you answered about the gui builder and it replacing swing...

As you said the effects and rendering engine are great, but what i should have asked is how will it work with swing? Awt to me seems like the older style, and swing newer ( i believe there is something about lightweight/heavyweight containers or something like that? No idea what they mean :p).

Also about the gui builder, on netbeans page for JavaFX there is something for 6.9 and a gui builder that looks really amazing. Im sorry i didnt specify clearly exactly what i was referring to. I also cannot link the location currently since im on my phone... i will update when my internet is back up

As for swing being replaced by JavaFX https://coderanch.com/t/555539/Java-FX/java/JavaFX- Mohamed says that they are going to stop working on Swing and focus on FX. So we can assume that it will replace Swing according to Mohamed's info?
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jay Orsaw wrote: As for swing being replaced by JavaFX https://coderanch.com/t/555539/Java-FX/java/JavaFX- Mohamed says that they are going to stop working on Swing and focus on FX. So we can assume that it will replace Swing according to Mohamed's info?


JavaFX and Swing would co-exist. Not like they can replace Swing because of the applications which have been built using Swing. But its not useful either to improvise and develop 2 different UI packages.

Jay Orsaw wrote: Also about the gui builder, on netbeans page for JavaFX there is something for 6.9 and a gui builder that looks really amazing. Im sorry i didnt specify clearly exactly what i was referring to. I also cannot link the location currently since im on my phone... i will update when my internet is back up



I am not sure if the builder was hugely popular. But then when I was worked on JavaFX long back (1 and early 1.2 time) there wasn't any builder. But there are few reports which say that development of a new GUI Builder is in progress OR its been completed OR its in its final stages.

Jay Orsaw wrote: As you said the effects and rendering engine are great, but what i should have asked is how will it work with swing? Awt to me seems like the older style, and swing newer ( i believe there is something about lightweight/heavyweight containers or something like that? No idea what they mean :p).


You can embed JavaFX content into Swing using a special panel. You can read about it in the tutorial here. Few developers have been putting in effort to embed Swing content into JavaFX(Read: thingsfx.com)
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohamed Sanaulla wrote:

Jay Orsaw wrote: As for swing being replaced by JavaFX https://coderanch.com/t/555539/Java-FX/java/JavaFX- Mohamed says that they are going to stop working on Swing and focus on FX. So we can assume that it will replace Swing according to Mohamed's info?


JavaFX and Swing would co-exist. Not like they can replace Swing because of the applications which have been built using Swing. But its not useful either to improvise and develop 2 different UI packages.

Jay Orsaw wrote: Also about the gui builder, on netbeans page for JavaFX there is something for 6.9 and a gui builder that looks really amazing. Im sorry i didnt specify clearly exactly what i was referring to. I also cannot link the location currently since im on my phone... i will update when my internet is back up



I am not sure if the builder was hugely popular. But then when I was worked on JavaFX long back (1 and early 1.2 time) there wasn't any builder. But there are few reports which say that development of a new GUI Builder is in progress OR its been completed OR its in its final stages.

Jay Orsaw wrote: As you said the effects and rendering engine are great, but what i should have asked is how will it work with swing? Awt to me seems like the older style, and swing newer ( i believe there is something about lightweight/heavyweight containers or something like that? No idea what they mean :p).


You can embed JavaFX content into Swing using a special panel. You can read about it in the tutorial here. Few developers have been putting in effort to embed Swing content into JavaFX(Read: thingsfx.com)



I feel like they left AWT alone and just worked on Swing, and the same is happening to JavaFX. Once you get better, the rest seem to die out. I would hope that they would co-exist on a great level because FX wont take over right away, and swing is a MAJOR component.

I really like the gui builder netbeans offers normally. Having to not type out the code for 140 menu items is enough for me to use the builder .

Thank you sirs for your responses!
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,

I am currently interested in JavaFX 2.0, as I intend to upgrade a Swing app to JavaFX. Is it easier to replace Swing's buttons, text fields, labels on a JPanel by JavaFX equivalent components?
I have read an article on how to add JavaFX UI to Swing app, but look like it requires adding a completely new JFXPanel kind of thing into a JFrame, that would mean I may have to rewrite the GUI completely (

What do you think guys?
 
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cole Terry wrote:Hello guys,

I am currently interested in JavaFX 2.0, as I intend to upgrade a Swing app to JavaFX. Is it easier to replace Swing's buttons, text fields, labels on a JPanel by JavaFX equivalent components?
I have read an article on how to add JavaFX UI to Swing app, but look like it requires adding a completely new JFXPanel kind of thing into a JFrame, that would mean I may have to rewrite the GUI completely (

What do you think guys?



It depends on what you are looking to do. If your intent is to test the waters with JavaFX 2.x, I would recommend downloading the 2.1 developer release and rewriting the application entirely in the latest incarnation of JavaFX. This will allow you to fully appreciate where this space is moving towards.

I think that you will find that you can achieve more with less code. I think the components appear much more polished in JavaFX as well. However, there are some rough edges currently, but I have been amazed at how usable JavaFX 2.0/2.1 are. The main thing I find to be missing is the wealth of existing component libraries and GUI builders like you would find in the Swing environment, but that's to be expected in a new platform.

Good luck!

- Pat
 
Patrick Martin
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jay Orsaw wrote:It seems wherever I read about it it talks about RIA(Rich Internet Applications) so is this all it does? I was reading on here it's going to replace swing? Does that mean it's a better gui builder than swing? Is the code java code, or is it different? I know there was JFX Script which was 1.0 I believe, and now 2.0 is in the API, so I would assume it's just normal Java code?



JavaFX uses a theater based on Stages and Scenes where the Stage abstracts away the differences in where the application is deployed.

So, in theory, the same application can run equally well within a browser or on the desktop as a result of this Stage metaphor/abstraction. The applet would, I guess, be the Stage for an internet application.

Having said that, I've only used JavaFX to run applications locally on the desktop and I have been quite happy with performance. Components such as file-choosers which were a bit sluggish in Swing run much faster within JavaFX from my experience.

I think that Swing and JavaFX will coincide for the foreseeable future. I predict that the cloudy future of Swing will drive more folks to JavaFX or away from the uncertainty of the Java GUI platform altogether. At some point, I would suspect that Oracle would stop investing in evolving Swing and simply port it from release to release.

Having said that, I think that finally after many years, JavaFX is on the right track with the 2.x roadmap. The winding path that it took to get here has lost it some credibility. However, Oracle seems to have finally decided a direction for the platform and seems to be fully committed to it's success. I was never a fan of learning JavaFX Script. I want to stay in Java, not spend time learning tiny domain specific languages.

- Pat
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Patrick Martin wrote:

Jay Orsaw wrote:It seems wherever I read about it it talks about RIA(Rich Internet Applications) so is this all it does? I was reading on here it's going to replace swing? Does that mean it's a better gui builder than swing? Is the code java code, or is it different? I know there was JFX Script which was 1.0 I believe, and now 2.0 is in the API, so I would assume it's just normal Java code?



JavaFX uses a theater based on Stages and Scenes where the Stage abstracts away the differences in where the application is deployed.

So, in theory, the same application can run equally well within a browser or on the desktop as a result of this Stage metaphor/abstraction. The applet would, I guess, be the Stage for an internet application.

Having said that, I've only used JavaFX to run applications locally on the desktop and I have been quite happy with performance. Components such as file-choosers which were a bit sluggish in Swing run much faster within JavaFX from my experience.

I think that Swing and JavaFX will coincide for the foreseeable future. I predict that the cloudy future of Swing will drive more folks to JavaFX or away from the uncertainty of the Java GUI platform altogether. At some point, I would suspect that Oracle would stop investing in evolving Swing and simply port it from release to release.

Having said that, I think that finally after many years, JavaFX is on the right track with the 2.x roadmap. The winding path that it took to get here has lost it some credibility. However, Oracle seems to have finally decided a direction for the platform and seems to be fully committed to it's success. I was never a fan of learning JavaFX Script. I want to stay in Java, not spend time learning tiny domain specific languages.

- Pat



It seems like FX is the way to go, 2.0 seemed like it was a good start, and now with 2.1 out it should be getting better and better. Apparently they are stopping support on Swing now though? I guess it's time to move forward!!!

I am basically recreating a program in Java and it has a gui interface/ works with 3D(Open GL). So would you think I should goto FX instead of Swing? Can Open GL and FX work together, or is there even a point to? FX's 3d is nice, but Open GL is everywhere, and IDK how the future will look on these 2... Any help would be appreciated!
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jay Orsaw wrote:Apparently they are stopping support on Swing now though?


I don't see support for Swing being removed in the foreseeable future. Swing has been declared to be in maintenance mode, which means that the only code changes will be bug fixes. Read my lips: No new API.
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:

Jay Orsaw wrote:Apparently they are stopping support on Swing now though?


I don't see support for Swing being removed in the foreseeable future. Swing has been declared to be in maintenance mode, which means that the only code changes will be bug fixes. Read my lips: No new API.



So would you say switching to JavaFX now would be a wise decision, or that FX/Swing's uses depend on what you are trying to accomplish?
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My impression is that Java FX is still a work in progress (other opinions welcome). However my opinion is also that they are indeed working on it.

So in the short term you might find that you're assisting in identifying bugs in the product as well as your own bugs. But in the longer term, I suspect Java FX might be a good bet, since Oracle seems to be behind it. One thing about Swing: it has good tutorials. I see that Java FX has tutorials too, but I haven't looked at them at all.
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:My impression is that Java FX is still a work in progress (other opinions welcome). However my opinion is also that they are indeed working on it.

So in the short term you might find that you're assisting in identifying bugs in the product as well as your own bugs. But in the longer term, I suspect Java FX might be a good bet, since Oracle seems to be behind it. One thing about Swing: it has good tutorials. I see that Java FX has tutorials too, but I haven't looked at them at all.



Yeah Swing will be good for awhile until FX takes over. FX is much nicer IMO just by looking at the sample demo from 2.0. Lots of abilities, better engine, it seems like it's the way to go, but we will see how it will work with swing and everything else, as there seems to be some limitations. I also want to see how it will work with Open GL like Swing/AWT/SWT does...
 
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic