|
Java™ by example!
|
|
|
How do I have different tooltips for each tick on my JSlider?
This example shows you how to create your own custom (Metal) UI which overrides some paintLabel methods to save the x, y location of each label. It also overrides the JSlider component to add an extra method setToolTipTextAt that allows you to set a tooltip for a particular label. It overrides the getToolTipText method to determine if the mouse is located on top of one of the labels. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|