Guest User

Untitled

a guest
Jan 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.awt.*;
  3. public class klasa {
  4.  
  5. /**
  6. * @param args
  7. */
  8. public static void main(String[] args) {
  9. // TODO Auto-generated method stub
  10. JFrame okno = new JFrame("nasze pierwsze okno");
  11. Container kontener=okno.getContentPane();
  12. JButton przycisk = new JButton("ok");
  13. przycisk.setBackground(Color.RED);
  14. przycisk.setForeground(Color.BLUE);
  15. kontener.add(przycisk);
  16. okno.pack();
  17. okno.setSize(300,200);
  18. okno.setResizable(false);
  19. okno.setLocation(200,200);
  20. okno.setVisible(true);
  21.  
  22.  
  23.  
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment