Look and Feel guidelines
The Java Look And Feel Design Guidelines published by Sun have many useful recommendations regarding user interfaces.
Some important points :
- changing look and feel is meant as a design tool, not as a runtime tool; that is, Sun recommends that applications should not allow the end user to change the look and feel at runtime.
- labels should always have an associated mnemonic, to allow navigation through the keyboard (Alt + F, for example) instead of the mouse. Two common exceptions are the default button (activated by hitting Enter or Return) and the Cancel button (activated by hitting Escape) - these should not have an associated mnemonic.
- choose mnemonics according to the typical menu styles, if possible ; otherwise, select the first letter, a prominent consonant, or a prominent vowel, in that order of preference.
- use the JLabel.setLabelFor method to associate a mnemonic with an element which would not otherwise have one, for example a JTextField.
shortcut keys (
File-> New, for example) usually have the Ctrl key as a modifier.
- the spacing of elements should be multiples of 6 pixels (6N) ; if one of the elements has a white border, then the spacing should be one pixel less (6N - 1).
- dialog title bars should contain the application name, for example "MyApp: Preferences", and "MyApp: About".
- JOptionPane messages should begin with a short, bold header on a single line (this can be implemented using HTML tags <bold> and <br>).
- Sun publishes a useful graphics repository
- typical menu style follows the order File, Object, Edit, Format, View, and Help. Any further menus are placed immediately before Help.
- menu titles should be a single word, while menu items may have more than one word
- ellipses (...) are used only when further user input is required
- almost all short textual items (menus, buttons, labels, for example) should have headline capitalization, where all words are capitalized except for common words with up to three letters (a, an, the, and, or, so, yet, etc.), and do not appear as the first or last word.
- if the text is not short, then the capitalization used in ordinary prose (sentence capitalization) should be used instead.
See Also :
Would you use this technique?