Ana
Ana

Reputation: 27

Java GUI - NOT Swing

I need a new way to create the graphical user interface of my application. I don't want to use Swing. I'm looking for something that looks a little different. Can you recommend me some other way of creating it, please?

Upvotes: 0

Views: 1563

Answers (3)

River
River

Reputation: 9093

Why not JavaFX ?

It is supposed to be replacing Swing as the standard Java GUI builder, so it would be a good option as it will be getting regular updates from Oracle itself. Additionally, being an officially sanctioned kit, it has plenty of tutorials, guides, and a decent (and growing) userbase that you can use for help.

And it uses CSS, which is good to learn as it can be useful in other applications. (Webdesign, etc.)

Finally, JavaFX is included with Java 8, so you don't even have to worry about installing a separate package! (Although adding a package is really not difficult if you prefer Java 7 or below.)

Upvotes: 4

jcollin.be
jcollin.be

Reputation: 310

Yes, javafx could be the way for you. You can create Views using FXML files instead of coding everything in java. The learning curve is not too hard in my view (and I am far from being a guru).

The tool Javafx Scene Builder is here to help you create your views or controls in FXML and integrates nicely with netbeans, and I suppose also with eclipse.

You can adapt the look of your controls using css.

I would suggest to start here to see if it would fit your need: http://docs.oracle.com/javafx/2/overview/jfxpub-overview.htm

Upvotes: 1

dimo414
dimo414

Reputation: 48794

If your complaint with Swing is how it looks, note that you can change the look and feel of a Swing application very easily, or even write your own if you really wanted.

To get a look and feel that matches other applications on your system, you call:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

At the beginning of your program.

The default L&F, called Metal, also has a couple themes you can choose from (or you can create your own):

MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

Upvotes: 2

Related Questions