import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class Line0 extends JFrame {

public void paint (Graphics g) {
    //this.paintComponents(g);
    int width,height;
    width = this.getWidth();
    height = this.getHeight();
    g.drawLine(0,0,width,height);
    //this.paintComponents(g);
}


  //Überschreiben, damit das Programm bei Herunterfahren des Systems beendet werden kann
  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }

    public static void main(String args[]) {
      Line0 f = new Line0();
      f.setTitle("Line 0. Beispiel");
      f.setSize(200,200);
    	f.setVisible(true);
    }


}



