I'm currently learning how swing works and trying to write a program that allows a user to add stars to a canvas (an exercise set forth in Roberts' Art and Science of Java). Everything works except the slider, which doesn't actually "slide" when I run it from eclipse. It does what it's supposed to do, (resize the stars), but the slider button itself doesn't move when you grab it and slide left or right. Is this a problem with the code or something strange in Eclipse, perhaps? Any help is appreciated.
Joshua Amy
Greenhorn
Joined: Dec 17, 2011
Posts: 12
posted
0
Furthermore, when you use the JComboBox, it will select the right color, but only shows the default "White" in the combo box.
Thanks. I'm using Eclipse 4.1; do you have any idea what I might try to change? I think everything is default, since I don't really know enough to mess around with the settings (often I change the application size, but that's all).
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
doubtful the problem is in eclipse. more likely to be in
extends GraphicsProgram or
addMouseListeners();
perhaps addMouseListeners() removes/overrides the slider/sliderUI listeners