Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package gameapp;
  7.  
  8. import javax.swing.JFrame;
  9.  
  10. public class Okno extends JFrame {
  11.     // переменная типа Pole
  12.     Pole gameP;
  13.     // конструктор класса для создания главного окна
  14.     public Okno() {
  15.         // указываем заголовок главного окна
  16.         setTitle("Игра1!");
  17.         // размеры и расположения окна
  18.         setBounds(100, 100, 800, 615);
  19.         // для правильного завершения программы
  20.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  21.         // создаем панель и добавляем ее в главное окно
  22.         gameP = createPanel();
  23.         // добавляем объект в главное окно
  24.         //getContentPane().add(gameP);
  25.         // для показа окна на экране
  26.         setVisible(true);
  27.     }
  28.     // создает объект типа Pole
  29.     public Pole createPanel() {
  30.         Pole p = new Pole();
  31.         return p;
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement