views:

18

answers:

1

Hi,

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

+2  A: 

Chance is that opaque property is set to false, i.e. it is transparent. Set it back to true for background to show up.

eugener
Bingo - that did the trick - Thanks!
earthling paul