tags:

views:

80

answers:

1

hello, I create an Slider object:

    val slider = new Slider{
        min = 0
        max = 30
        labels = Map(0 -> new Label("Nula"),15-> new Label("Pul"),30-> new Label("Max"))
        paintLabels = true
    }

when I run this, an exception is thrown: scala.swing.Label cannot be cast to java.awt.Component but why? When i browse the docs, the excpected type for labels is a Map[Int,Label].

+3  A: 

It is a bug, which was corrected for Scala 2.8 about 8 months ago.

Daniel