Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easiest Way to Create A GUI in Java?

I'm currently trying to create a GUI for a program I wrote that helps you save your passwords for sites into a file. As of right now the program will let you edit and provide those to you in a terminal/cmd. I want for it to have a GUI that would have 2 buttons in the beginning stating would you like to "See your passwords" or "Edit passwords". "See your passwords" would take you to another section of the GUI letting you see yours passwords, and "Edit passwords" would take you to a section of the GUI letting you add passwords and details into the file. Can somebody provide me good online tutorials that will allow me to accomplish this?

like image 298
user1535246 Avatar asked Jul 18 '12 15:07

user1535246


1 Answers

If you want to do it the standard way, you can try out Swing as it comes with Java (JFC to be precise) and has good tutorials and support. Here is the official tutorial: Swing tutorial.

If you want to use something that uses the native OS components, then SWT is for you. Lars Vogel has zounds of tutorials in this topic: SWT tutorial.

If you want something new and shiny, then take a look at Java FX. It is meant to compete with FLEX and it is also an Oracle stuff: Java FX tutorial (edit: JavaFX is no longer part of the SDK).

There are other frameworks, but these are the most usable and well documented in my opinion.

One big plus for Swing and SWT is that you can use WindowBuilder to easily create UI-s with it. You can take a look at it here: WindowBuilder.

like image 56
Adam Arold Avatar answered Oct 20 '22 10:10

Adam Arold