0

I have a toolbar and various buttons in. There is always a dashed line displyad along the borders on last button clicked. Aslo there are some sliders in my panel. When I try to adjust the value of a slider it also has a dashed border. This border is only on the last selected values either buttons or sliders. I dont know what it is called. What I want is that these dashed borders should not be displayed.
You can see in the image what i am talking about

Attachments g.jpg 218.71 KB
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by javaAddict
0

The dashed borders appear whenever you select something. If you add a lot of buttons in a frame and you click one it is natural the it will appear selected.
I believe that these dashed line are to show you which element you selected.

My advice, although you will have to test since I have never done it before, is to add a MouseListener on the elements you want to remove the borders and whenever the mouseReleased is triggered to have the element "lose focus". For the last part you will have to check the API for the right method.

example:
For JButtons there is the setSelected method

Also look at the implemented classes of:
ItemSelectable

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.