Newsletter sign-up
View all newsletters

Sign up for our Enterprise Java Newsletter

Enterprise Java

Designing a cross-platform look and feel with Java

Learn how to fulfill the promise of "Write Once, Run Anywhere" with one-time GUI design methods

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

March 31, 1998 -- When designing interfaces for users with all kinds of computers and access, Web developers are actually ahead of Java developers. Web designers are used to testing their sites and pages on multiple platforms, screen resolutions, color ranges, and browsers. Good Web designers know they can't just create Web sites on and for their own high-powered, million-color development machines equipped with atypically large monitors and browsers-of-choice -- they must test their sites for look-and-feel aesthetics and efficiency on as many types of computers, color ranges, screen sizes, and browsers as they intend to support. If they failed to do this -- and, admittedly, some still do -- they would turn away a large segment of users due to technical inaccessibility.

When Java first arrived, most Java developers concentrated on just getting an applet or application to work; designing multiviewer support was an afterthought. But if developers want their apps to be taken seriously by a variety of users, they must put some thought and effort into designing multi-platform GUIs. In fact, such consideration is crucial to fulfilling JavaSoft's "Write Once, Run Anywhere" promise: If you have to redesign your app to work on each new platform you support, you might as well return to traditional programming methods.

In the "Designing a Cross-Platform Look and Feel" session at JavaOne, three Java design experts -- Harry Vertelney, manager of the JavaSoft Human Interface Group at Sun Microsystems; Chris Ryan, senior interface engineer at Sun Microsystems; and Steve Wilson, software engineer at K&A Software -- suggested exploiting the Java Foundation Classes (JFC) technology as a GUI design toolkit to implement a standard interface for Java apps.

Vertelney, Ryan, and Wilson discussed the historical problems surrounding Java GUI design: While it's easy enough to build a useful Java app, most developers continue to design their apps with one platform in mind, then redesign their original effort for other platforms. This method is time-consuming, Java-philosophy-defeating, and theoretically unnecessary.

To address this issue, begin by exploring the design problems that arise from platform to platform. First, look down at your right (or left) hand. How many buttons does your mouse have? Macintoshes have one button, while Windows, Unix-based GUIs, and other operating systems generally have two or three. Another consideration is that widgets -- such as windows, panels, text fields, buttons, radio buttons, check boxes, and menus -- that fulfill a standard look and behavior on Windows don't completely mesh with standard widgets on the Macintosh and on other platforms. Simple mouse-clicks represent another problem: Windows relies on the mouse's right-most button for alternative commands, whereas the Mac requires holding the mouse button down for a delayed period of time, or executing a combination of mouse and keyboard keys; in addition, the results of single- and double-clicking vary on each platform. Conflicting color palettes on each platform can also cause problems; for instance, the standard 256-color palette on Windows comprises different colors than the standard 256-color palette on the Mac. After looking at just a few examples, it's easy to understand the general problem facing Java GUI designers. Cross-platform Java developers need reliable solutions, and luckily, the GUI design experts posed some eloquent ones.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
  • JavaSoft Senior Interface Engineer Chris Ryan's "Designing the Java Look and Feel" JavaOne Session Slides http://java.sun.com/javaone/javaone98/sessions/T312/cr_index.htm
  • JavaSoft's Java Foundation Classes page http://java.sun.com/products/jfc/
  • PersonalJava targets non-desktop computers http://www.javaworld.com/jw-04-1998/jw-04-pjava.html
  • Organic Santa Fe look and feel http://java.sun.com/javaone/javaone98/sessions/T312/hv19_organicsf.htm
  • Organic Vancouver look and feel http://java.sun.com/javaone/javaone98/sessions/T312/hv20_organicva.htm
  • Java look and feel screenshot http://java.sun.com/javaone/javaone98/sessions/T312/hv22_jlf.htm