Is it possible to make a visually appealing GUI with JavaFX & Swing? - java

I would like to do a visually appealing / user-friendly GUI in java. Swing is a limited in terms of "skin" customization. I'm thinking about JavaFX, but I don't get 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:
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

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 :
Jonathan Giles blog on Swing/JavaFX/Griffon
Dean Iverson blog going more in details about JavaFX components
Amy Fowler blog
And finally, take a look at JavaFX home site samples.

Yes, Swing is very customizable. I recommend reading Filthy Rich Clients.
For an example, have a look at Cezanne L&F.

Swing alone can also create awesome looking UIs. You can explore online for number of plugins and samples to add various features. I'd recommend you go through Romain Guy's Blog & Read his book Filthy Rich Clients. I found this blog really cool.
Swing won't disappoint you.

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.

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.

Yes, you can do that with JavaFX by writing your own CSS files. Learn more at: JavaFX CSS Documentation
It is actually not that hard if you are familiar with CSS.

you can get colorful original GUI with LookAndFeelMetalizer.
For example phoyo was done with it.

Related

A better gui design using java

I am planning to develop an java application,so i am in search of some library's that can give a pleasant look and feel and easy to customize.I tried swing but the look and feel is not much i expected and creating a look and feel is not so easy i think (i am not sure). i am from web development. In my previous question Java GUI development alternative to swt or swing most guys recommend javafx and i am working on an 64 bit linux machine and javafx is not available for that. I need some advice ,
Better to create own look and feel library else suggest some good library for look and feel
Note:i tried nimbus look and feel.
I can just give some suggestions that I am using in conjunction with Swing:
JRibbon/Flamingo (Office 2007 like ribbons)
Substance Look and Feel (works very well with JRibbon/Flamingo and is quite configurable, with a lot of predefined skins)
SwingX (additional/extended Swing components)
Note that for Substance there's a fork called Insubstantial which contains also a Flamingo fork named Peacock.
JRibbon is the best replacement for menu and toolbar in a Java application. JRibbon gives a better user experiance then ordinary menubar and toolbar. It is look like rich UI Component in Java. JRibbon has all facility like Microsoft Office Ribbon have like application menu, taskbar.
Source : JRibbon Tutorial

How to implement animation into a JFrame

I am used to making web pages with animation using JQuery. I am now making a Java Desktop Application using Netbeans and Netbeans' Swing and without any animation it's looking pretty plain and boring.
Are there any resources I can use for a guide to implement animation into my program?
Does anyone have suggestions on what method to use?
Edit: I am not interested in something I'd have to buy.
A good starting point would be Filthy Rich Clients. Both the principles and the framework code may be helpful to you.
If you're looking for a nice look and feel then Substance might be a good way forward. It's not over-the-top animated or anything like that, but it's got a lot of skins and some in particular look very nice.
Many thanks to stemm who pointed me in the right direction.
I decided to use JavaFX (JavaFX 2 to be exact)
Here is some resources I am using:
http://download.oracle.com/javafx/
http://download.oracle.com/javafx/2.0/swing/jfxpub-swing.htm

GUI frameworks for Java

I was wondering if anyone has any suggestions of frameworks to give an old desktop application a much needed facelift.
The application has had a long life without anyone giving any attention to its exterior resulting in a monster with an 80s look.
I've just downloaded and tried MyDoggy framework for making windows floatable and dockable. So I'm looking similar for quick and easy fixes that will bring a dead looking application back to life.
I think you don't want to rewrite your app, right? Because it seems as all the other guys think so, suggesting SWT and JavaFX.
To pimp your existing Swing App, take a look at jgoodies.com, the substance look and feel or the swinglabs
Just changing the look and feel and some components might already help to give your application a second youth. Consider for example Violet which is IMO a nice looking application. It uses a custom theme based on the PgsLookAndFeel and some components from L2FProd.com.
You could give Oracle's ADF a try.
If you want to go with the latest and greatest, you could try JavaFX. Bu tof course using good old swing or the more OS agnostic SWT does the trick as well.
There's ofcourse the Eclipse Rich Client Platform or the Netbeans Rich Client Platform.

Skinning Java desktop applications?

Does anybody know a way to "skin" Java desktop applications. (Like Winamp skins, or skins for MirandaIM)?
I don't want to create my own look and feel.
Yes, there are a few ways this can be done, but I don't know anyone that is really simple. Have a look at Nimbus: The New Face of Swing, it contains a few examples. You can often override the look of components or just change the colors.
Some links:
Nimbus Colors
Skinning a Slider with Nimbus
Nimbus UIManager UIDefaults
And you can always change to another LaF, in example Substance.
We've successfully used the NimROD Look and Feel to 'skin' the Swing look & feel. It works well, has several 'themes' already written for it, and can be added in a few lines of code.
Swing has built-in dynamic look and feel support. If you are talking about desktop apps, you might want to start with Lesson: Modifying the Look and Feel.
Edit: If you are talking about a webapp, then absolutely use different .css to acheive a skinnable interface. CSS Zen Garden is a great example/tutorial on how the same page can look entirely different with a different .css file.
For a project that's still actively maintained in 2022 and allows skinning of Swing applications try FlatLaf
FlatLaf is a modern open-source cross-platform Look and Feel for Java
Swing desktop applications.
It looks almost flat (no shadows or gradients), clean, simple and
elegant. FlatLaf comes with Light, Dark, IntelliJ and Darcula themes,
scales on HiDPI displays and runs on Java 8 or newer.
The look is heavily inspired by Darcula and IntelliJ themes from
IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
Another modern look and feel active maintained in 2022 is https://github.com/vincenzopalazzo/material-ui-swing
It include also a way to develop a custom theme in an external jar, like this one https://github.com/material-ui-swing/DarkStackOverflowTheme

What Java GUI framework is good for a first GUI project?

The title description basically says it all. I'd like to use something that requires a relatively short learning curve since it is my first project and I'd like to spend at least some of it actually writing the code, not just learning how to do it, but also something that has good documentation in a way that some new bleeding edge framework probably wouldn't. Any ideas?
If what you want to do, is actually create a working program with a GUI, and you just want to do that I would recommend looking at the Swing GUI editor in NetBeans, as it is very easy to work with and powerful too.
There is an old demonstration floating around showing how to implement a preference panel like the one in Netscape Navigator (the predecessor to Firefox), but I cannot find it right now.
The Java tutorial trail is here: http://java.sun.com/docs/books/tutorial/uiswing/learn/index.html
EDIT: It appears the preference panel demo has been taken offline. You may want to see this demo for NetBeans 6.0 instead: http://www.javalobby.org/eps/matisse-updates/
It's not clear if you mean a desktop or Web GUI.
For a desktop GUI, just use Java's Swing framework. Creating a GUI With JFC/Swing is a starting point for that. Sure it's old but then again so is Swing. You could also try The Java Swing tutorial.
For a Web GUI, start with servlets/JSPs. Try Servlets and JavaServer Pages (JSP) 1.0: A Tutorial.
Swing + MiGLayout ^^
I know you did say you wanted a simple and easy to learn GUI toolkit. #cletus has nailed that answer :)
But if need to look for alternatives and evaluate them before you decide how to write a GUI, check out this list of alternatives to Swing and AWT.
Swing + GroupLayout
I've been posting on these a couple of times.

Categories

Resources