How can I set the background color of a Slider in Scala Swing 2.8 final. I copied the UIDemo object provided in the distribution for my tests and added
background = java.awt.Color.RED
but that does not take effect on my mac.
object UIDemo extends SimpleSwingApplication {
...
object slider extends Slider {
min = 0
value = tabs.selection.index
max = tabs.pages.size-1
majorTickSpacing = 1
background = java.awt.Color.RED
}
...
}
I had in mind that this was working before - did I miss something along the way?
开发者_开发百科Thanks, Paul
Chance is that opaque
property is set to false, i.e. it is transparent. Set it back to true for background to show up.
精彩评论