Hallo,
ich will erstmal "nur" eine Linie zeichen. Das fkt auch ganz ok, allerdings wird das Frame dabei transparent.... Hab schon mit backgroundColor probiert, aber ändert auch nix.
Hier ist der Code :
Vielen Dank schon mal.
ich will erstmal "nur" eine Linie zeichen. Das fkt auch ganz ok, allerdings wird das Frame dabei transparent.... Hab schon mit backgroundColor probiert, aber ändert auch nix.
Hier ist der Code :
Java:
public class TestClass extends JFrame {
public TestClass() {
super();
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public void paint(Graphics g){
g.drawLine(50,50,200,200);
}
public static void main(String[] args) {
TestClass tc = new TestClass();
tc.setVisible(true);
tc.setSize(1024,680);
}
}
Vielen Dank schon mal.