Zebra stripes are subtle alternating stripes painted behind list items in a graphical user interface (GUI). They improve the readability of wide and long lists, but the JList class in Java's Swing doesn't support them. This tip shows how to extend JList to add zebra background stripes.
Table zebra stripes are alternating subtle background stripes painted behind the table's rows in a graphical user interface (GUI). They improve the readability of long rows in wide tables, but the JTable class in Java's Swing doesn't support them. This tip shows how to extend JTable to add zebra background stripes.
Zebra stripes in a graphical user interface (GUI) are subtle background stripes painted behind the rows of a hierarchical list, or tree. They improve the readability of wide tree rows, but the JTree class in Java's Swing doesn't support them. This tip shows how to extend JTree to add zebra background stripes.
Java's Swing components have a constant background color used to fill the entire component area. To add interest, contrast, and polish to a user interface, override the component's background painting and add a gradient to smoothly vary the color across the background. This tip shows how and demonstrates the effect.
File and folder icons are an important part of the look and feel of the Mac. These icons are available to Java applications through several different classes in Swing and sometimes as UI defaults for Apple's "Mac OS X" look and feel. This article shows to how to get at these icons using Java on a Mac.
Part of the Mac look and feel is the use of standard icons across many applications, like the color wheel for the color picker, or the gear for advanced settings. To promote uniformity across Mac applications, Apple provides these icons via their NSImage class in the AppKit toolkit for Objective C. This article shows how to get at these same standard icons using Java on a Mac.
Java's Swing has just one generic notion of a button and just one look for that button. However, Apple's Aqua user interface for the Mac has about a dozen different button types to build stand-alone buttons and bars of adjacent segmented buttons. Each Aqua button type has a specific use, from the purple ? button for help, to glossy OK/Cancel/Open/Save buttons, and recessed scope buttons used to modify search operations. This article shows how to use Apple's "Mac OS X" look and feel for Java to access these hidden button types using Java on a Mac.
The default size of Java's Swing components feels large and clunky when building tightly-packed user interfaces for Mac tool palettes, inspectors, ribbons, and info windows. Beneath Swing, however, Apple's Aqua user interface for the Mac includes predefined smaller component sizes designed explicitly for tightly-packed control panels. This article shows how to use Apple's "Mac OS X" look and feel for Java to create these hidden smaller components using Java on a Mac.