Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to build custom GUI like this in Java?

I made this in Photoshop and I plan to use it for my file sharing application:

Screenshot

I was wondering if it was possible to create GUI for my application that is gonna have this look and feel.

If I can't build it only by using eclipse or NetBeans, are there any other tools that could help me?

like image 403
AmateurProgrammer Avatar asked Jan 12 '10 12:01

AmateurProgrammer


People also ask

Can you build GUI with Java?

GUI, which stands for Graphical User Interface, is a user-friendly visual experience builder for Java applications. It comprises graphical units like buttons, labels, windows, etc. via which users can connect with an application. Swing and JavaFX are two commonly used applications to create GUIs in Java.

Is Java GUI outdated?

Majority of existing GUI java codebases are Swing and likely will stay that way until the codebase rots and nobody maintains it anymore. Majority of new GUI java codebases are using JavaFX , which is the Swing replacement in Java8 and is part of the standard java library now.

Is GUI easy in Java?

GUI (Graphical User Interface) in Java is an easy-to-use visual experience builder for Java applications. It is mainly made of graphical components like buttons, labels, windows, etc. through which the user can interact with an application. GUI plays an important role to build easy interfaces for Java applications.

Which is better JavaFX or Swing?

Swing is the standard toolkit for Java developer in creating GUI, whereas JavaFX provides platform support for creating desktop applications. Swing has a more sophisticated set of GUI components, whereas JavaFX has a decent number of UI components available but lesser than what Swing provides.


2 Answers

Is not only possible but quite easy, you don't have to go all the way to create a custom Look and Feel.

This is what I've made in 20 minutes:

20mins

There is a lot of information on the web on how to customize the components without having to create a whole new L&F.

Understanding the Swing Architecture helps a lot.

Just in case you haven't read it the Swing Tutorial is here.

Finally you'll need the doc: Java doc

like image 114
OscarRyz Avatar answered Oct 16 '22 04:10

OscarRyz


Creating new LaF is too much. Since all your JButtons are different, just use JButton.setIcon() and JButton.setPressedIcon() and use your images. The rest is loading background and using strange fonts. Use Font.createFont() to load custom fonts. You'll probably have to draw your own JProgressbar. Override JProgressBar.paintComponent(Graphics g) and draw your own image.

like image 32
Denis Tulskiy Avatar answered Oct 16 '22 03:10

Denis Tulskiy