I'm trying to run a applet but I get the error:
java.lang.ClassCastException: gui.Start cannot be cast to java.applet.Applet
(if this is important I'm using eclipse)
My code is (class Line extends JPanel)
import javax.swing.JFrame;
import java.awt.*;
public class Start {
public static void main(String[] args) {
JFrame window = new JFrame();
window.setSize(100, 600);
window.setTitle("Sliding Windows");
Line la = new Line (0,0,60, 300, Color.blue);
Container c = window.getContentPane();
c.add(la);
window.setVisible(true);
}
}