Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.awt.*;
  2. import java.applet.*;
  3.  
  4. public class A14k_Kreis_mit_Mittelpunkt_und_Radius extends Applet{
  5.     public class Kreis {
  6.         int x, y, r;
  7.        
  8.         public Kreis (int x1, int y1, int r1){
  9.             x=x1;
  10.             y=y1;
  11.             r=r1;
  12.         }
  13.        
  14.         public void zeichnedich (Graphics stift){
  15.             stift.drawOval(x-r, y-r, 2*r, 2*r);
  16.         }
  17.     }
  18.    
  19.     public void paint(Graphics stift){
  20.         Kreis K1 = new Kreis(100, 150, 50);
  21.         K1.zeichnedich(stift);
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement