I'm trying to display an image in a SimpleSwingApplication. I would like to make the image change size when the window changes size (i.e. manually dragging the cursor to adjust size).
I think this is done by listening for something, then reacting with UIElementResized.
But I'm not sure how to actually do it.
I've tried:
listenTo(top) \\ or Window/Frame/UIEvent
reactions += {
// case UIElementResized=>
case class UIElementResized(source: UIElement); => // or without the semicolon, without "source: UIElement", without "class", and a few other permutations.
println(size)
}
I asked a similar question yesterday, but it was narrow. I want to make a more broad question about the entire problem.