martaczaska

Okno_2

Jan 3rd, 2020
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. package com.company;
  2.  
  3. import javax.swing.JFrame;
  4. import javax.swing.JPanel;
  5. import java.io.File;
  6.  
  7.  
  8. public class Okno extends JFrame{
  9.  
  10.     public Okno(int w_okno, int h_okno) {
  11.         super("Witaj w grze!");
  12.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  13.         setLocation(450, 150);
  14.         setSize(w_okno, h_okno);
  15.         setResizable(false);
  16.  
  17.  
  18.         //JPanel tlo_gry = new Pole_gry(); //nie wiem czemu nie dziaΕ‚a, linijka z javastart
  19.         //Pole_gry ustaw_tlo = new Pole_gry();
  20.         //add(ustaw_tlo);  // --''--
  21.        
  22.  
  23.         add(new Pole_gry(w_okno,h_okno));
  24.  
  25.         setVisible(true);
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment