Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

image

I want to remove that inner dotted border after select something from ComboBox.

I tried

UIManager.put("ComboBox.focus", new Color(0,0,0,0));

but not working. How can remove that border?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
204 views
Welcome To Ask or Share your Answers For Others

1 Answer

can you give this one a try ? I hope it helps

combobox.setBorder(new EmptyBorder(0, 0, 0, 0));

if you want to remove focus (i think dotted border you mention can be result of focus on widget) you can use getNextFocusableComponent() and requestFocusInWindow()


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...