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


public class Line00 extends JFrame {

  int n=0;
  public void paint (Graphics g)
  {
    int width,height;
     n++;
    width = this.getWidth();
    height = this.getHeight();
    g.drawLine(10,10,width-10,height-10);
    //g.drawLine(10,10,100,200);
    System.out.println("in paint: "
         +Integer.toString(n) );


  }

  public Line00() {
    setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    setTitle("1. Beispiel");
  }

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


}





