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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.