Hej.
Er der nogen der kan se hvorfor dette simple program ikke virker:
import java.awt.*;
public class DrawLine2 {
public static void main(String[] args){
DrawingPanel panel = new DrawingPanel(200, 100);
Graphics g = panel.getGraphics();
g.drawLine(25, 75, 100, 25);
g.drawLine(100, 25, 175, 75);
g.drawLine(25, 75, 175, 75);
}
}
Compileren giver en fejl ved:
new DrawingPanel(200, 100);
som siger:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
DrawingPanel cannot be resolved to a type
DrawingPanel cannot be resolved to a type
at DrawLine2.main(DrawLine2.java:5)
På forhånd tak for hjælpen
Indlæg senest redigeret d. 21.09.2009 17:11 af Bruger #5097