Java. Проблема с добавлением картинки на background JFrame

288
20 декабря 2016, 23:54

Доброго времени суток. Имеется код,и я никак не могу поставить картинку на фот определенных панелей. Лазил по форумам,читал,но никак не смог ничего найти. Объясните,как это сделать с моим кодом,и почему это делается именно так (механика работы и т.д.)?

package division;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DIVISION extends JFrame {
String EName; int ENumber,EStat,ERew;
int Player[][] = new int[4][6];
int nPlayer,nDamage=0;
int RNumber,RStat; String RName;
int hor,vert,ma,mb,ga,gb;
Font GFont = new Font("Segoe UI Symbol", Font.PLAIN, 18);
String[] Language = {
        "English",
        "Русский",
    };
String tNewGame="Новая Игра";
String tSettings="Настройки";
String tExit="Выход";
String tFullScreen="Полноэкранный режим";
String tMainMenu="В главное меню";
String tDoor="Дверь";
String tRun="Бежать";
String tAttack="Атаковать";
String tNext="Далее";
String tLevelI="Уровень:";
String tDamage="Урон:";
String tWictory="Победа игрока -";
String tName="Имя:";
String tReward="Наград:";
String tBattle="Бой";
String tWic="Победа в бою";
String tLose="Не по силам";
private JPanel MainMenu;
    private JButton MMNGame; 
    private JButton MMSettings; 
    private JButton MMExit; 
private JPanel FullSettingsMenu;
    private JButton FSMBack;
    private JCheckBox FSFullScreen; 
    private JComboBox FSSetLanguage;
private JPanel Menu;
    private JButton MBack;
    private JButton MMainMenu;
    private JButton MExit;
private JPanel Game;
    private JLabel Result;
    private JLabel Name; private JLabel IName;
    private JLabel Stat; private JLabel IStat;
    private JLabel Rew; private JLabel IRew;
    private JLabel DamageP1; private JLabel DamageIP1;
    private JLabel LevelP1; private JLabel LevelIP1;
    private JLabel LevelP2; private JLabel LevelIP2;
    private JLabel LevelP3; private JLabel LevelIP3;
    private JLabel LevelP4; private JLabel LevelIP4;
    //First Player
    private JLabel p1h1;
    private JLabel p1h2;
    private JLabel p1h3;
    private JLabel p1h4;
    private JLabel p1h5;
    private JLabel p1h1I;
    private JLabel p1h2I;
    private JLabel p1h3I;
    private JLabel p1h4I;
    private JLabel p1h5I;
    //------------
    //First Player
    private JLabel p2h1;
    private JLabel p2h2;
    private JLabel p2h3;
    private JLabel p2h4;
    private JLabel p2h5;
    private JLabel p2h1I;
    private JLabel p2h2I;
    private JLabel p2h3I;
    private JLabel p2h4I;
    private JLabel p2h5I;
    //------------
    //First Player
    private JLabel p3h1;
    private JLabel p3h2;
    private JLabel p3h3;
    private JLabel p3h4;
    private JLabel p3h5;
    private JLabel p3h1I;
    private JLabel p3h2I;
    private JLabel p3h3I;
    private JLabel p3h4I;
    private JLabel p3h5I;
    //------------
    //First Player
    private JLabel p4h1;
    private JLabel p4h2;
    private JLabel p4h3;
    private JLabel p4h4;
    private JLabel p4h5;
    private JLabel p4h1I;
    private JLabel p4h2I;
    private JLabel p4h3I;
    private JLabel p4h4I;
    private JLabel p4h5I;
    //------------
    private JButton GMenu;
    private JButton Door; private JButton Next;
    private JButton Attack;
    private JButton Run;
private JPanel Win;
    private JButton WinB;
public DIVISION() {
    initComponents();
}
private void initComponents() {
    Dimension sSize = Toolkit.getDefaultToolkit().getScreenSize();
    vert = sSize.height;
    hor = sSize.width;
    //Setings of window//
    setSize(hor,vert);
    setResizable(false);
    setUndecorated(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    //----------------//
    //Setings of buttons//
    ma=(hor/4);//height//
    mb=(vert/10);//width//
    ga=(hor/100)*15;
    gb=(vert/100)*4;
    //------------------//

    MainMenu = new JPanel();
    MainMenu.setLayout(null);
        MMNGame = new JButton(tNewGame);
            MMNGame.setSize(ma, mb);
            MMNGame.setLocation((hor/2)-(ma/2),300);
            MMNGame.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MMNGameActionPerformed(evt);
                }
            });
        MMSettings = new JButton(tSettings);
            MMSettings.setSize(ma, mb);
            MMSettings.setLocation((hor/2)-(ma/2),400);
            MMSettings.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MMSettingsActionPerformed(evt);
                }
            });
        MMExit = new JButton(tExit);
            MMExit.setSize(ma, mb);
            MMExit.setLocation((hor/2)-(ma/2),500);
            MMExit.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MMExitActionPerformed(evt);
                }
            });
    MainMenu.add(MMNGame);MainMenu.add(MMSettings);MainMenu.add(MMExit);
    FullSettingsMenu = new JPanel();
    FullSettingsMenu.setLayout(null);
        FSMBack = new JButton("\u21B6");
            FSMBack.setSize(50, 50);
            FSMBack.setLocation(0,0);
            FSMBack.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    FSMBackActionPerformed(evt);
                }
            });
        FSFullScreen = new JCheckBox(tFullScreen);
            FSFullScreen.setSize(ma, mb);
            FSFullScreen.setLocation((hor/2)-(ma/2),400);
            FSFullScreen.setSelected(true);
            FSFullScreen.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    FSFullScreenActionPerformed(evt);
                }
            });
        FSSetLanguage = new JComboBox(Language);
            FSSetLanguage.setSize(ma, mb);
            FSSetLanguage.setLocation((hor/2)-(ma/2),500);
            FSSetLanguage.setSelectedIndex(1);
            FSSetLanguage.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    FSSetLanguageActionPerformed(evt);
        }
    });
    FullSettingsMenu.add(FSMBack);FullSettingsMenu.add(FSFullScreen);FullSettingsMenu.add(FSSetLanguage);

    Menu = new JPanel();
    Menu.setLayout(null);
        MBack = new JButton("\u21B6");
            MBack.setSize(50, 50);
            MBack.setLocation(0,0);
            MBack.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MBackActionPerformed(evt);
                }
            });
        MMainMenu = new JButton(tMainMenu);
            MMainMenu.setSize(ma, mb);
            MMainMenu.setLocation((hor/2)-(ma/2),400);
            MMainMenu.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MMainMenuActionPerformed(evt);
                }
            });
        MExit = new JButton(tExit);
            MExit.setSize(ma, mb);
            MExit.setLocation((hor/2)-(ma/2),500);
            MExit.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MExitActionPerformed(evt);
                }
            });
    Menu.add(MBack); Menu.add(MMainMenu); Menu.add(MExit);
    Game = new JPanel();
    Game.setLayout(null);
        GMenu = new JButton("\u2699");
            GMenu.setFont(GFont);
            GMenu.setSize(50, 50);
            GMenu.setLocation(0,0);
            GMenu.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    GMenuActionPerformed(evt);
                }
            });
        Result = new JLabel("Result");
            Result.setSize(ga,gb);
            Result.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2)-(gb*5));
        Name = new JLabel("Name");
            Name.setSize(ga,gb);
            Name.setLocation((hor/2)-(ga/2)+ga/2,(vert/2)-(gb/2)-(gb*4));
        IName = new JLabel(tName);
            IName.setSize(ga/2,gb);
            IName.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2)-(gb*4));
        Stat = new JLabel("Stat");    
            Stat.setSize(ga/2,gb);
            Stat.setLocation((hor/2)-(ga/2)+ga/2,(vert/2)-(gb/2)-(gb*3));
        IStat = new JLabel(tDamage);
            IStat.setSize(ga/2,gb);
            IStat.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2)-(gb*3));
        Rew = new JLabel("Rew");
            Rew.setSize(ga/2,gb);
            Rew.setLocation((hor/2)-(ga/2)+ga/2,(vert/2)-(gb/2)-(gb*2));
        IRew = new JLabel(tReward);
            IRew.setSize(ga/2,gb);
            IRew.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2)-(gb*2));
        Door = new JButton(tDoor);
            Door.setSize(ga,gb);
            Door.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2));
            Door.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    DoorActionPerformed(evt);
                }
            });
        Next = new JButton(tNext);
            Next.setSize(ga,gb);
            Next.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2));
            Next.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    NextActionPerformed(evt);
                }
            });
            Next.setVisible(false);
        Attack = new JButton(tAttack);
            Attack.setSize(ga/2,gb);
            Attack.setLocation((hor/2)-(ga/2),(vert/2)-(gb/2)+gb);
            Attack.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    AttackActionPerformed(evt);
                }
            });
            Attack.setVisible(false);
        Run = new JButton(tRun);
            Run.setSize(ga/2,gb);
            Run.setLocation((hor/2)-(ga/2)+ga/2,(vert/2)-(gb/2)+gb);
            Run.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    RunActionPerformed(evt);
                }
            });
            Run.setVisible(false);
        p1h1I = new JLabel("");
            p1h1I.setSize(ga/2,gb);
            p1h1I.setLocation((hor/2)-(ga/2)*2,vert-(gb*3));
            p1h1I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h2I = new JLabel("");
            p1h2I.setSize(ga/2,gb);
            p1h2I.setLocation((hor/2)-(ga/2),vert-(gb*3));
            p1h2I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h3I = new JLabel("");
            p1h3I.setSize(ga/2,gb);
            p1h3I.setLocation((hor/2),vert-(gb*3));
            p1h3I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h4I = new JLabel("");
            p1h4I.setSize(ga/2,gb);
            p1h4I.setLocation((hor/2)+(ga/2),vert-(gb*3));
            p1h4I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h5I = new JLabel("");
            p1h5I.setSize(ga/2,gb);
            p1h5I.setLocation((hor/2)+(ga/2)*2,vert-(gb*3));
            p1h5I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h1 = new JLabel("");
            p1h1.setSize(ga/2,gb);
            p1h1.setLocation((hor/2)-(ga/2)*2,vert-(gb*2));
            p1h1.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h2 = new JLabel("");
            p1h2.setSize(ga/2,gb);
            p1h2.setLocation((hor/2)-(ga/2),vert-(gb*2));
            p1h2.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h3 = new JLabel("");
            p1h3.setSize(ga/2,gb);
            p1h3.setLocation((hor/2),vert-(gb*2));
            p1h3.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h4 = new JLabel("");
            p1h4.setSize(ga/2,gb);
            p1h4.setLocation((hor/2)+(ga/2),vert-(gb*2));
            p1h4.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p1h5 = new JLabel("");
            p1h5.setSize(ga/2,gb);
            p1h5.setLocation((hor/2)+(ga/2)*2,vert-(gb*2));
            p1h5.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        DamageIP1 = new JLabel(tDamage);
            DamageIP1.setSize(ga,gb);
            DamageIP1.setLocation((hor/2)-(ga/2),(vert/2)+gb*2);
        DamageP1 = new JLabel("1");
            DamageP1.setSize(ga,gb);
            DamageP1.setLocation((hor/2),(vert/2)+gb*2);
        LevelIP1 = new JLabel(tLevelI);
            LevelIP1.setSize(ga,gb);
            LevelIP1.setLocation((hor/2)-(ga/2)*2,vert-(gb*4));
        LevelP1 = new JLabel("");
            LevelP1.setSize(ga,gb);
            LevelP1.setLocation((hor/2)-(ga/2),vert-(gb*4));
        p2h1 = new JLabel("");
            p2h1.setSize(ga/2,gb);
            p2h1.setLocation(0,(vert/2)-(gb/2)-(gb*8));
            p2h1.setBorder(BorderFactory.createLineBorder(Color.BLACK));    
        p2h1I = new JLabel("");
            p2h1I.setSize(ga/2,gb);
            p2h1I.setLocation(0,(vert/2)-(gb/2)-(gb*7));
            p2h1I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h2 = new JLabel("");
            p2h2.setSize(ga/2,gb);
            p2h2.setLocation(0,(vert/2)-(gb/2)-(gb*4));
            p2h2.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h2I = new JLabel("");
            p2h2I.setSize(ga/2,gb);
            p2h2I.setLocation(0,(vert/2)-(gb/2)-(gb*3));
            p2h2I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h3 = new JLabel("");
            p2h3.setSize(ga/2,gb);
            p2h3.setLocation(0,(vert/2)-(gb/2));
            p2h3.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h3I = new JLabel("");
            p2h3I.setSize(ga/2,gb);
            p2h3I.setLocation(0,(vert/2)-(gb/2)+gb);
            p2h3I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h4 = new JLabel("");
            p2h4.setSize(ga/2,gb);
            p2h4.setLocation(0,(vert/2)-(gb/2)+(gb*4));
            p2h4.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h4I = new JLabel("");
            p2h4I.setSize(ga/2,gb);
            p2h4I.setLocation(0,(vert/2)-(gb/2)+(gb*5));
            p2h4I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h5 = new JLabel("");
            p2h5.setSize(ga/2,gb);
            p2h5.setLocation(0,(vert/2)-(gb/2)+(gb*8));
            p2h5.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p2h5I = new JLabel("");
            p2h5I.setSize(ga/2,gb);
            p2h5I.setLocation(0,(vert/2)-(gb/2)+(gb*9));
            p2h5I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        LevelIP2 = new JLabel(tLevelI);
            LevelIP2.setSize(ga,gb);
            LevelIP2.setLocation(0+ga+ga/2,(vert/2)-(gb/2));
        LevelP2 = new JLabel("");
            LevelP2.setSize(ga/4,gb);
            LevelP2.setLocation(0+ga*2,(vert/2)-(gb/2));
        p3h1I = new JLabel("");
            p3h1I.setSize(ga/2,gb);
            p3h1I.setLocation((hor/2)-(ga/2)*2,0);
            p3h1I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h2I = new JLabel("");
            p3h2I.setSize(ga/2,gb);
            p3h2I.setLocation((hor/2)-(ga/2),0);
            p3h2I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h3I = new JLabel("");
            p3h3I.setSize(ga/2,gb);
            p3h3I.setLocation((hor/2),0);
            p3h3I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h4I = new JLabel("");
            p3h4I.setSize(ga/2,gb);
            p3h4I.setLocation((hor/2)+(ga/2),0);
            p3h4I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h5I = new JLabel("");
            p3h5I.setSize(ga/2,gb);
            p3h5I.setLocation((hor/2)+(ga/2)*2,0);
            p3h5I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h1 = new JLabel("");
            p3h1.setSize(ga/2,gb);
            p3h1.setLocation((hor/2)-(ga/2)*2,0+(gb));
            p3h1.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h2 = new JLabel("");
            p3h2.setSize(ga/2,gb);
            p3h2.setLocation((hor/2)-(ga/2),0+(gb));
            p3h2.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h3 = new JLabel("");
            p3h3.setSize(ga/2,gb);
            p3h3.setLocation((hor/2),0+(gb));
            p3h3.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h4 = new JLabel("");
            p3h4.setSize(ga/2,gb);
            p3h4.setLocation((hor/2)+(ga/2),0+(gb));
            p3h4.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p3h5 = new JLabel("");
            p3h5.setSize(ga/2,gb);
            p3h5.setLocation((hor/2)+(ga/2)*2,0+(gb));
            p3h5.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        LevelIP3 = new JLabel(tLevelI);
            LevelIP3.setSize(ga,gb);
            LevelIP3.setLocation((hor/2)-(ga/2)*2,0+(gb*3));
        LevelP3 = new JLabel("");
            LevelP3.setSize(ga/4,gb);
            LevelP3.setLocation((hor/2)-(ga/2),0+(gb*3));
        p4h1 = new JLabel("");
            p4h1.setSize(ga/2,gb);
            p4h1.setLocation(hor-ga/2,(vert/2)-(gb/2)-(gb*8));
            p4h1.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h1I = new JLabel("");
            p4h1I.setSize(ga/2,gb);
            p4h1I.setLocation(hor-ga/2,(vert/2)-(gb/2)-(gb*7));
            p4h1I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h2 = new JLabel("");
            p4h2.setSize(ga/2,gb);
            p4h2.setLocation(hor-ga/2,(vert/2)-(gb/2)-(gb*4));
            p4h2.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h2I = new JLabel("");
            p4h2I.setSize(ga/2,gb);
            p4h2I.setLocation(hor-ga/2,(vert/2)-(gb/2)-(gb*3));
            p4h2I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h3 = new JLabel("");
            p4h3.setSize(ga/2,gb);
            p4h3.setLocation(hor-ga/2,(vert/2)-(gb/2));
            p4h3.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h3I = new JLabel("");
            p4h3I.setSize(ga/2,gb);
            p4h3I.setLocation(hor-ga/2,(vert/2)-(gb/2)+gb);
            p4h3I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h4 = new JLabel("");
            p4h4.setSize(ga/2,gb);
            p4h4.setLocation(hor-ga/2,(vert/2)-(gb/2)+(gb*4));
            p4h4.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h4I = new JLabel("");
            p4h4I.setSize(ga/2,gb);
            p4h4I.setLocation(hor-ga/2,(vert/2)-(gb/2)+(gb*5));
            p4h4I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h5 = new JLabel("");
            p4h5.setSize(ga/2,gb);
            p4h5.setLocation(hor-ga/2,(vert/2)-(gb/2)+(gb*8));
            p4h5.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p4h5I = new JLabel("");
            p4h5I.setSize(ga/2,gb);
            p4h5I.setLocation(hor-ga/2,(vert/2)-(gb/2)+(gb*9));
            p4h5I.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        LevelIP4 = new JLabel(tLevelI);
            LevelIP4.setSize(ga,gb);
            LevelIP4.setLocation(hor-ga*2,(vert/2)-(gb/2));
        LevelP4 = new JLabel("");
            LevelP4.setSize(ga/4,gb);
            LevelP4.setLocation(hor-ga-ga/2,(vert/2)-(gb/2));
        Win = new JPanel();
        Win.setLayout(null);
            WinB = new JButton(tWictory + Integer.toString(nPlayer+1));
                WinB.setSize(hor, vert);
                WinB.setLocation(0,0);
                WinB.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        WinBActionPerformed(evt);
                    }
                });
        Win.add(WinB);

    Game.add(GMenu);Game.add(Door);Game.add(Next);Game.add(Attack);Game.add(Run);
    Game.add(Result);Game.add(Name);Game.add(IName);Game.add(Stat);Game.add(IStat);Game.add(Rew);Game.add(IRew);
    Game.add(p1h1);Game.add(p1h2);Game.add(p1h3);Game.add(p1h4);Game.add(p1h5);
    Game.add(p1h1I);Game.add(p1h2I);Game.add(p1h3I);Game.add(p1h4I);Game.add(p1h5I);
    Game.add(DamageIP1);Game.add(DamageP1);Game.add(LevelIP1);Game.add(LevelP1);
    Game.add(LevelIP2);Game.add(LevelP2);Game.add(LevelIP4);Game.add(LevelP4);Game.add(LevelIP3);Game.add(LevelP3);
    Game.add(p2h1);Game.add(p2h2);Game.add(p2h3);Game.add(p2h4);Game.add(p2h5);
    Game.add(p2h1I);Game.add(p2h2I);Game.add(p2h3I);Game.add(p2h4I);Game.add(p2h5I);
    Game.add(p3h1);Game.add(p3h2);Game.add(p3h3);Game.add(p3h4);Game.add(p3h5);
    Game.add(p3h1I);Game.add(p3h2I);Game.add(p3h3I);Game.add(p3h4I);Game.add(p3h5I);
    Game.add(p4h1);Game.add(p4h2);Game.add(p4h3);Game.add(p4h4);Game.add(p4h5);
    Game.add(p4h1I);Game.add(p4h2I);Game.add(p4h3I);Game.add(p4h4I);Game.add(p4h5I);
    Game.add(Win);
    add(MainMenu);
}                      
//Main Menu
private void MMNGameActionPerformed(ActionEvent evt) {
   restart();
   this.setContentPane(Game);
   revalidate();
   repaint();
}
private void MMSettingsActionPerformed(ActionEvent evt) {
   this.setContentPane(FullSettingsMenu);
   revalidate();
   repaint();
}
private void MMExitActionPerformed(ActionEvent evt) {
    Exit();
}
//Settings
private void FSMBackActionPerformed(ActionEvent evt) {
   this.setContentPane(MainMenu);
   revalidate();
   repaint();
}
private void FSFullScreenActionPerformed(ActionEvent evt) {
} 
private void FSSetLanguageActionPerformed(ActionEvent evt) {
}
//Game
private void GMenuActionPerformed(ActionEvent evt) {
   this.setContentPane(Menu);
   revalidate();
   repaint();
}
private void DoorActionPerformed(ActionEvent evt) {
    Door.setVisible(false);
    Attack.setVisible(true);
    Run.setVisible(true);
    Next.setVisible(false);
}
private void RunActionPerformed(ActionEvent evt) {
    Attack.setVisible(false);
    Run.setVisible(false);
    Next.setVisible(true);
}
private void AttackActionPerformed(ActionEvent evt) {
        Attack.setVisible(false);
        Run.setVisible(false);
        Next.setVisible(true);
}
private void NextActionPerformed(ActionEvent evt) {
    Attack.setVisible(false);
    Run.setVisible(false);
    Door.setVisible(true);
}
private void MBackActionPerformed(ActionEvent evt) {
   this.setContentPane(Game);
   revalidate();
   repaint();
}
private void MMainMenuActionPerformed(ActionEvent evt) {
   this.setContentPane(MainMenu);
   revalidate();
   repaint();
}
private void WinBActionPerformed(ActionEvent evt) {
   this.setContentPane(MainMenu);
   revalidate();
   repaint();
}
private void MExitActionPerformed(ActionEvent evt) {
}
public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
            new DIVISION().setVisible(true);
        }
    });
}                                   
}
READ ALSO
Использование библиотеки Picasso в AIDE

Использование библиотеки Picasso в AIDE

Здравствуйте, в связи с отсутствием компьютера и желанием идти в ногу со временем, я решил найти способ использовать сторонние библиотеки...

267
алгоритм Тайного Санты (SSA - Secret Santa Algorithm)

алгоритм Тайного Санты (SSA - Secret Santa Algorithm)

Готовлю новогоднюю вечеринку с друзьями, решили сыграть в тайного сантуНо до нового года не встречаемся, поэтому жеребьевка удаленно

422
Сколько весит объект в java?

Сколько весит объект в java?

Есть в проекте одна проблема, которая решается двумя способамиНо я не могу оценить какой способ будет "дешевле" для памяти

367
Java и Jsoup помогите

Java и Jsoup помогите

Вот мой код

365