Skip to main content

JavaFX SwingCheckBox background

3 replies [Last post]
muelleco
Offline
Joined: 2009-05-27

Hi
I have a SwingCheckBox on a rectangle with a black background. Now I have the problem that the checkbox has a light gray background color under the text. Is it possible to have a SwingCheckBox with transparent background or how can I set the background color of a SwingCheckBox? Does anybody has an idea?

thx

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
muelleco
Offline
Joined: 2009-05-27

Thx. That works. But is there also a way to make the background transparent? Because I have a black/whithe rectangle with an effect and then this checkboxes looks ugly.

alexsch
Offline
Joined: 2007-07-12

[code]
Rectangle{
opacity: 0.5
}
[/code]

alexsch
Offline
Joined: 2007-07-12

The [b]opacity [/b] attribute should help:

[code]
SwingCheckBox{
opacity: 0.5
}
[/code]