The ability to author a program or applet on one computer system and have it run on many different platforms is a paramount strength of Java and its suitability for the Internet. This strength, however, introduces weaknesses in some areas of the implementation that limit Java's usability.
One such weakness that is quickly coming to the forefront is the Java Graphical User Interface or JaGUI (pronounced "jah-gooey" which sounds about the way it looks). The cross-platform ability of Java is detrimental to its usability and consistency. Because applets will be run on various platforms with different user interfaces, screen sizes, and resolutions, Java only allows you to vaguely place GUI components in the window with the Abstract Windowing Toolkit (AWT). AWT basically pulls everything to the lowest common denominator to insure compatibility, and effectively brings the computer industry back to 1984 with its implementation of the user interface. The whole implementation was written by a company using UNIX and Solaris, neither of which is breaking ground in graphical user interfaces.
The JaGUI can be done well in some cases, but it is often left up to the programmer as well as sheer luck. I have seen some terrible Java programs that require a secret decoder ring to decipher and which look like someone played pin-the-component-on-the-window while drunk. Users deserve a clean, sensible interface and will not settle for less. This especially rings true as more and more people are coming online without programming background or the patience to learn a new interface for every Java applet.
Macintosh users will suffer the most when they come online and try Java for the first time. Mac users have enjoyed the best user interface for more than ten years and it has become an ingrained part of how we use our computer. The standardized interface, which includes such advances as drag-and-drop, a single menu bar, WYSIWYG, and a consistent metaphor, has made the Macintosh easier to use, more productive, and generally the best system available for most work. This great interface ends where Java begins and many users will turn away from Java before trying to figure out the strewn buttons and components.
The solution is simple. Apple should create a set of JaGUI classes that replicates the best features of Macintosh the interface inside Java. A powerful set of libraries could give developers the tools they need to create stunning and intuitive Java programs. I am not talking about porting the MacOS to Java but rather implementing some of the MacOS's best features and ideas in a set of general class libraries that work on every machine. Windows and UNIX have been slowly adopting and copying many of the elements, so the classes would simply build on existing behavior. A clean, advanced user interface could bring Java out of its infancy, and Apple could help Sun do it.
Until this happens, developers must take it upon themselves to create a clean interface for their users. Here are some useful considerations:
- Consistency - Keep the interface similar throughout the program. If the "OK" button is on the right in one window, it should be on the right in subsequent windows. This lets the user accumulate knowledge about the program over time and will allow that user to become "comfortable" sooner. An attempt should also be made to mimic the behavior of the operating system to help users feel at home.
- Short cuts - Create command-key shortcuts for common functions. Also, make default behaviors for dialogs. If the window makes a change, the default button should be "Cancel" instead of "OK".
- Menus - Provide menus with items that do not change. Options can be disabled but it is useful for the user to see the options anyway. A user may not find commands if you add them during the course of the program.
- Feedback - If the user completes an action or if the program is busy, the user should be told by a progress bar or status area. The user should never be confused over whether something has been completed.
- Component choice - Choose the GUI component that suits the purpose. Do not use radio buttons if you have many choices because they create clutter. Try using a pop up menu instead.
- Placement - Place the components in specific aligned places with the same border. Do not place components too close together because they will become hard to read and use. Do not place them too far apart because you will be wasting space. If no Java layout pattern works, try writing your own.
- Forgiveness - Allow the user to undo anything in the program to encourage exploration and reduce frustration. If an action is unable to undo itself, make sure to tell the user and offer the option of cancelling before completing the action.
- Sounds and Animation - Use sounds and animations sparingly. Not only do they require more download time, they often can become annoying. Use alert sounds only when an error has occurred which requires the user's immediate attention.
- Audience - Consider the people who are going to use your program and design it accordingly. Watch people use the program and note where they had difficulty or success in completing tasks.
- Test, test, test - Test the program on every type of machine since there are some major differences between computer platforms. Resolve any differences in the program without reverting to special code.
Java programmers also owe it to themselves and their users to buy a copy of "Macintosh Human Interface Guidelines" (ISBN 0-201-62216-5). The book describes how people interact with computers and what they expect in various situations. It gives examples of good interfaces and can be helpful for any operating system or computer language. Many companies design their software around the advice given and treat it as the bible of the software industry.