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?
5 Answers 5
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.
3 Comments
The Java Tutorials on Swing are a pretty good resource. If you don't like hand-coding your UI with Java code there are several GUI builders out there where you can lay out your UI visually and just fill in the behaviour in code-behind. E.g. Netbeans has such a thing and there is WindowBuilder for Eclipse.
Comments
If you don't have to use Swing, you can also try Java FX 2.x, which, I think, has a better look and feel. The latest version of Netbeans has a Java FX builder, but for what you describe it should be fairly easy to setup your frame programmatically.
5 Comments
If you want to alleviate Java GUI programming then maybe you could consider using some framework, for example Griffon. I use it and it's pretty easier than pure Swing.
2 Comments
Here you go: