Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GUI programming in Java for Windows? [closed]

Tags:

java

What is the best approach for making GUI applications for windows with Java?

Is it AWT and Swing? Or is it outdated?

like image 281
Arun Abraham Avatar asked Dec 28 '22 02:12

Arun Abraham


1 Answers

If you are starting from scratch and don't have any experience one way or another I suggest looking into JavaFX. It is Oracle's declarative user interface similar to XAML and Flex. I believe it will eventually surpass AWT, Swing and SWT.

While Swing may be common when using Java, more often than not it leads to slow and bulky user experiences. I cannot suggest using Swing.

Why JavaFX

  • The user interface is declarative; you don't have to write Java code. This allows for some really great user interface builders to be constructed, because it can process the UI without having to compile or process Java.
  • The user interface is easily separated from business logic, allowing for separation of concerns and paradigms such as MVVM, MVC, etc.
  • Hardware acceleration support.
  • Transition effects between controls. Something that would take substantial amount of code in Swing.

Download page:

JavaFX and Scene Builder Developer Preview

I realize OS X and Linux are still in the development preview stage, but I'd still pick that over using Swing.

like image 116
Andrew T Finnell Avatar answered Dec 29 '22 14:12

Andrew T Finnell