Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package gameapp;
- import javax.swing.JFrame;
- public class Okno extends JFrame {
- // переменная типа Pole
- Pole gameP;
- // конструктор класса для создания главного окна
- public Okno() {
- // указываем заголовок главного окна
- setTitle("Игра1!");
- // размеры и расположения окна
- setBounds(100, 100, 800, 615);
- // для правильного завершения программы
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- // создаем панель и добавляем ее в главное окно
- gameP = createPanel();
- // добавляем объект в главное окно
- //getContentPane().add(gameP);
- // для показа окна на экране
- setVisible(true);
- }
- // создает объект типа Pole
- public Pole createPanel() {
- Pole p = new Pole();
- return p;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement