Hiya. Im studying Java where I work and figured I could do this easily enough, but it only made it really obvious how bad I am at it (go figure!)!
Im so frustrated I could almost cry sometimes.
What I want do learn to do is create a canvas (is that the proper word?) from scratch and place upon it 2 scrollbars. For some reason I get errors all over my code when I try and do that! My code is
Please help!
Im so frustrated I could almost cry sometimes.
What I want do learn to do is create a canvas (is that the proper word?) from scratch and place upon it 2 scrollbars. For some reason I get errors all over my code when I try and do that! My code is
Code:
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class ColourChooser {
public ColourChooser() {
/*I want to be able to create the scrollbar characteristics here and
then instiate them down below...but I'll try and get it working first! */
}
public static void main(String[] args) {
//Main Method
ColourChooser colourchooser = new ColourChooser();
JFrame f = new JFrame();
f.setSize(400, 400);
Slider1=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255);
add(Slider1);
Slider2=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255);
add(Slider2);
}
}
Please help!