How to make a good gui design in Swing

Hello family StackOverFlow

I have a Java Swing application, but I want to improve the design of my Swing frames. I am looking for this problem on Google, but I cannot find a suitable solution. Please share your experience and opinions on this issue.

ps Maybe this question is not suitable for you, but it is important for me and others like me.

+7
java user-interface swing
source share
4 answers

Go and buy this book:


(source: filthyrichclients.org )

From the description page:

Dirty saturated clients are applications that are so graphically saturated that they ooze cool. They drag the user in from the start and hold onto him with a dead grip of arousal. They make the user tell friends about applications.

In short, they make the user truly enjoy their application. When was the last time you enjoyed using the software?

Maybe you need more dirty rich customers in your life.

Read this and understand it until you get the interface you like.

:)

+17
source share

Joel Spolsky has a great article: User Interface Design for Programmers . He does not specifically consider Swing, but explains how to create simple and efficient user interfaces for non-programmers.

+5
source share

Ok, I will give you my experience. I prefer SWT and Eclipse as a whole, simply because it integrates much more beautifully and is so flexible with additional points and much more, but I sometimes understand that this is overkill.

When using swing, I almost always use GridBagLayout if the form is not very simple. This is due to the fact that most of the graphical interfaces that I design or use contain many elements that are not necessarily laid out in a stream or table style. Gridbaglayout offers the ability to draw ui in the java way like + allow resizing if necessary, or you can prevent this from happening.

The specific things I use are:

GridBagConsts.insets = new Insets(2,2,2,2); 

This adds an addition to any gridbaglayout cell, which makes it look more like a program developed for Gtk / MS than something that I dumped together.

 try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { System.out.println("Error setting native LAF: " + e); } 

Customizing the look of the system - I'm not a fan of the fact that the built-in theme (metal) and integration with the system are much more friendly.

This is about him for tough and quick rules. Things I suggest you look at:

Other than that, it is very application specific and you will need to read the overall user interface design. In general, it helps to use built-in controls and tools, that is, those that look like a system. For example, the Java Class Library includes File Choosers: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html , which when installed on an LAF system displays as Windows or Gnome (-ish) . Taking steps to familiarize yourself with each other application will in turn simplify your application.

+1
source share

Also pay attention to JSR-296: this is an attempt to formalize some aspects of the application assembly, for example, how to process resource packages, how to run "tasks" (background and modal, etc.).

The current (and some previous versions) Netbeans has a wizard for creating JSR-296 applications. ("Desktop Applications").

http://jcp.org/en/jsr/detail?id=296

+1
source share

All Articles