Guest User

Untitled

a guest
Apr 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. Import Java.awt.*
  2.  
  3. Public class Figury extends Frame {
  4. Figury() {//konstruktor
  5.  
  6.     setSize(500,600);
  7.     SetVisible(true);
  8. }
  9.  
  10. public void paint (Graphics cos) {
  11.     cos.drawLine( 5, 10, 50, 100);
  12.     cos.drawRect(10, 10, 20, 30);  //prostokąt
  13.     cos.fillRoundRect(8, 90, 10, 10);  //wypełniony I zaokrąglony prostokąt
  14. }
  15.  
  16. Public static void main (String args[]) {
  17. new Figury();
  18.  
  19. }
  20. }
Add Comment
Please, Sign In to add comment