I am just trying to have some of my JButtons
to be painted fully orange in addition to the orange border when they have focus. Instead, setFocusPainted(true)
turns out to only paint the border:
Many applications seem to use the full orange buttons for focus, but I struggle to find the correct solution for this in Java Swing.
I have no problems implementing my own custom JButtons
or whatever. But I would think there should be a simple setting for this, because I shouldn't have to go and find out the RGB color values which Ubuntu uses so I can comply with native UI stuff.
I want this:
Pressing tab changes the JButton
to its normal color as it loses focus.
I am obviously using the specific System's LAF. I used setFocusPainted(true)
and all (otherwise the orange border wouldn't be there). It is also possible to get this when using MigLayouts specified buttons (okbutton etc.):
So what am I missing?