Hi,
i'm a beginner in programming in Java and i seem to be a bit stuck.
I'm trying to create an applet in which 2 pictures are shown. If you click the picture in the upper left corner, it should change into an other picture. This works fine.
But, i also want to use a slider! (I don't even know if this is possible, for i am a beginner).
The source code without the slider is:
(see attachment panoramawithslider.java.txt)
The pictures red.jpg & blue.jpg are basic images (74x72) made in paint. Panorama.gif can be found at: http://www.olympia360.com/art/Panorama.gif
Now i want to add a slider (is it possible to put it anywhere i want?). I thought i could use parts of the following source code: http://grace.evergreen.edu/artofcomp...es/Slider2.php
I placed the lines from
JSlider slider = new JSlider(...
through
pane.add(slider);
after
addMouseListener(this);
in my own source. I left out the changelistener and the counter. I also imported javax.swing.*; and javax.swing.event.*;.....
Attached as Panoramawithslider.java.txt
This doesn't work, because i get a compiling error at this.getContentPane():
cannot resolve symbol
symbol : method getContentPane()
location: class panorama
Container pane = this.getContentPane();
^ (under the 'g')
I guess these are basic errors but as a beginner i seem to be a bit stuck here. So, can somebody help me?Thanks.
Idunnootje.