views:

380

answers:

5

I would like to do a "sexy" / user-friendly / appealing GUI in java. Swing is a limited in terms of "skin" customisation. I'm thinking about JavaFX but I don't it yet,

  • what can I achieve with this technology ?
  • how hard is it ?
  • do you have examples of real-life examples of Swing/JavaFX integration ?

I would like to do something in this spirit of this, which is built on the .NET framework: GUI example with .NET techno

original link: http://www.patrickpayet.com/net/?p=329 edit: is their any getting started overview sample code that I can read to get a general feeling of the work needed to be done to achieve something in the spirit of the screenshot? maybe something like the miglayout's swing demo http://www.migcalendar.com/miglayout/swingdemoapp.jnlp

edit2: I found http://download.java.net/general/openjfx/demos/tutorial.jnlp it's really basic though, linked from http://www.deitel.com/ResourceCenters/Programming/JavaFX/JavaFXTutorialsandDemos/tabid/2187/Default.aspx

+5  A: 

Doing such a GUI with JavaFX seems to be rather easy.

For a rapid view on the JavaFX echosystem, I would suggest you to take a look at those sites, showing most of the bleeding edge JavaFX technologies :

Riduidel
thanks a lot, is their any getting started overview sample code that I can read to get a general feeling of the work needed to be done to achieve something in the spirit of the screenshot? maybe something like the miglayout's swing demo http://www.migcalendar.com/miglayout/swingdemoapp.jnlp ?
phmr
Well, having not investigated JavaFX in depth, I can't reply such an answer. However, I know colleagues who have chosen this path, and its seems like the javafx home page may direct you to rather good tutorials.
Riduidel
I added a javafx webstart demo to the question http://download.java.net/general/openjfx/demos/tutorial.jnlp
phmr
+2  A: 

Yes, Swing is very customizable. I recommend reading Filthy Rich Clients.

For an example, have a look at Cezanne L&F.

Jonas
wow! I didn't knew that LnF was that flexible.
phmr
A: 

Swing's L&F can help you in this case.

The traditional way to customize L&F is to write your own UI classes for all components, which is not easy.

The Synth L&F is included in JRE5 and become mature in JRE6. With Synth L&F you can customize your own look and feel with images and painter classes. You can also take a look at this IDE for Synth based L&F.

Xavier Young
A: 

see this jfxstudio.wordpress.com /2009/07/26/on-line-poker-javafx-client/

you shoould try to develop you answers. Factorisation is good in CS programmation not in communication.
phmr
+1  A: 

Also checkout my entry to the JFXStudio challenge last year:

http://jfxstudio.wordpress.com/2009/11/10/challenge-five-winners/

This is a very simple "Video Poker" game written in just less than 3,000 characters (ie 30 lines of code). Note that 90% of the graphical elements are images, which gives you an idea of the scope you have for producing "sexy" UIs.

I'll also add that the main elements of this application were written in one evening. JavaFX is a very powerful tool for UI creation once you get used to it.

Matthew Hegarty
impressive job, thanks for input. That said, where is the code ? in the jars ? I consider this a bug part of some sort of elitism. I have nothing about elitism. That's not hard to put a zip file online nowdays (cf. http://dl.free.fr/), cheers.
phmr
Not sure what you mean about elitism - I mention my intention to supply the code in the comments on that page, though haven't done so yet (it would need a rewrite from its highly condensed current form). I still intend to do so. However, the links that others have posted would give you more than enough grounding to write a similar trivial app in JavaFX.
Matthew Hegarty