On Thu, 14 Jul 2022 16:25:12 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:

>. I tried these but none removed the border (even though appearance changes 
>for a standard JButton in testing):
> 
> * arrowButton.setBorder(javax.swing.BorderFactory.createEmptyBorder());
> * arrowButton.setBorderPainted(false);
> * arrowButton.setFocusPainted(false);
> 
> The appearance of this button in JComboBox seems to be set by the JRS, thus 
> making a change to the button's border not possible. This concern will be 
> compiled in a list alongside other questions regarding appearance of a 
> JComboBox.

Since the arrowButton is rendered by JRS, it needs to be instucted not to draw 
the border in that case..The above methods will not work as JRSUIPainter does 
not know about that, so one can call 
`painter.state.set(FOCUSED.NO)`
or something like that to remove the focused border.
Having said that, I dont think it will be correct to remove the border from the 
button as it is meant to show focus is on that component. 
Ideally, the textfield also should have a focus border around it similar to 
button, so it will look uniform, so instead of removing border from button, we 
can try to draw focus border around textfield (maybe something similar to 
JDK-7124282)

-------------

PR: https://git.openjdk.org/jdk/pull/9473

Reply via email to