*
The moose likes JavaFX and the fly likes JDBC and JavaFX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "JDBC and JavaFX" Watch "JDBC and JavaFX" New topic
Author

JDBC and JavaFX

Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Hello

Does JavaFX support JDBC libraries ?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

JavaFX supports anything Java. That said, I wouldn't put JDBC code directly in a JavaFX application. I'd personally prefer to create the JavaFX app that accesses my data via web services. This makes it much easier to distribute.


GenRocket - Experts at Building Test Data
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Gregg Bolinger wrote:JavaFX supports anything Java. That said, I wouldn't put JDBC code directly in a JavaFX application. I'd personally prefer to create the JavaFX app that accesses my data via web services. This makes it much easier to distribute.


I reason i asked is because i want to create a desktop application which communicate with my online webstore built in php/mysql. I think through JDBC, using Swing as UI, I can accomplish that.

How would I accomplish accessing my MySQL Data in JavaFX ?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

If you already have the backend built in php/mysql, just expose some web services that the JavaFX application can access. No JDBC required. Gail's book has a chapter on this. It is the flikr example.
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Gregg Bolinger wrote:If you already have the backend built in php/mysql, just expose some web services that the JavaFX application can access. No JDBC required. Gail's book has a chapter on this. It is the flikr example.


So that is solved.

Now the question arises, how does JavaFX's GUI libraries compare to Swings ?
Gail Anderson
Author
Ranch Hand

Joined: Jul 07, 2009
Posts: 44
JavaFX hasn't implemented every Swing control, but you can use Swing controls with JavaFX.

Eventually, they will have a very complete UI control set. As I've said in other posts, the JavaFX UI engineers come from a Swing background and want to make JavaFX UI controls an improved system from what you get with Swing. So, eventually the JavaFX "native" UI controls will probably be what you want to use.

JavaFX is much, much easier to use than Swing. I could post some code (I posted some code that transforms a rectangle by scaling, rotating, and shearing using a slider, but I can't find that post right now) that lets you see, but at this point, I think you would get most of your questions answered if you downloaded JavaFX and tried it out. It's not a huge time investment and you could see how you personally like it.
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Gail Anderson wrote:J As I've said in other posts, the JavaFX UI engineers come from a Swing background and want to make JavaFX UI controls an improved system from what you get with Swing. So, eventually the JavaFX "native" UI controls will probably be what you want to use.


So could it be said that JavaFX might be the replacement for Swing ?
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Gail Anderson wrote:
JavaFX is much, much easier to use than Swing. I could post some code (I posted some code that transforms a rectangle by scaling, rotating, and shearing using a slider, but I can't find that post right now) that lets you see, but at this point, I think you would get most of your questions answered if you downloaded JavaFX and tried it out. It's not a huge time investment and you could see how you personally like it.


I will certainly do that in time. First have to get the Java Language under my belt.
Gail Anderson
Author
Ranch Hand

Joined: Jul 07, 2009
Posts: 44
It sounds like JavaFX is the replacement for Swing, but Sun has said many times that Swing isn't going away. So, no.

And no, you absolutely do not have to first get Java under your belt. While JavaFX lets you leverage your Java knowledge, it is absolutely not a requirement for building JavaFX apps or learning JavaFX and experimenting with building GUIs.

Your toes are in the water, just jump in already!
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Gail Anderson wrote:

Your toes are in the water, just jump in already!


lol Thanks for the push. i hope I am not troubling you will so many questions on JavaFX ..
 
wood burning stoves
 
subject: JDBC and JavaFX