April, 2009

  • April 26, 2009

    Java's Swing JSlider creates a sliding widget for selecting a number within a fixed range. The sliding "thumb" icon, the track it slides on, tick marks, and labels may be turned on and off, but Swing has no other methods to affect the appearance of a JSlider. That's left up to the current look and feel. This article shows how to use Apple's "Mac OS X" look and feel for Java on a Mac to create smaller JSliders and switch between two thumb icon styles. The article also shows work-arounds for controlling tick and label sizes and colors.

Syndicate content
Nadeau software consulting
Nadeau software consulting