From c76841f5e2b6ae28335ed8f87eb4ba49909bb84d Mon Sep 17 00:00:00 2001 From: goblinrf Date: Fri, 24 Nov 2023 23:24:01 +0300 Subject: [PATCH] Done --- .idea/misc.xml | 1 + src/FormAirFighter.java | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 1e7df8d..432b646 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,3 +1,4 @@ + diff --git a/src/FormAirFighter.java b/src/FormAirFighter.java index ac2b095..af2c1ff 100644 --- a/src/FormAirFighter.java +++ b/src/FormAirFighter.java @@ -23,9 +23,9 @@ public class FormAirFighter { } public FormAirFighter(){ - JFrame MonorailFrame =new JFrame (); + JFrame AirplaneFrame =new JFrame (); JButton buttonCreate = new JButton("Создать"); - JButton buttonCreateLocomotive = new JButton("Создать самолет с радаром"); + JButton buttonCreateAirFighter = new JButton("Создать боевой самолёт"); JButton buttonStep = new JButton("Шаг"); JComboBox comboBoxStrategy = new JComboBox( new String[]{ @@ -98,7 +98,7 @@ public class FormAirFighter { } } ); - buttonCreateLocomotive.addActionListener( + buttonCreateAirFighter.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e){ Random random = new Random(); @@ -151,29 +151,29 @@ public class FormAirFighter { } }); - MonorailFrame.setSize (900, 500); - MonorailFrame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); - MonorailFrame.setLayout(null); + AirplaneFrame.setSize (900, 500); + AirplaneFrame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); + AirplaneFrame.setLayout(null); canv = new Canvas(); canv.setSize(pictureBoxWidth, pictureBoxHeight); buttonCreate.setBounds(198, 401, 180, 40); - buttonCreateLocomotive.setBounds(12, 401, 180, 40); + buttonCreateAirFighter.setBounds(12, 401, 180, 40); RightButton.setBounds(840,411,30,30); LeftButton.setBounds(768,411,30,30); UpButton.setBounds(804,375,30,30); DownButton.setBounds(804,411,30,30); comboBoxStrategy.setBounds(719,12,151,28); buttonStep.setBounds(768, 46, 94, 29); - MonorailFrame.add(canv); - MonorailFrame.add(buttonCreate); - MonorailFrame.add(buttonCreateLocomotive); - MonorailFrame.add(UpButton); - MonorailFrame.add(DownButton); - MonorailFrame.add(LeftButton); - MonorailFrame.add(RightButton); - MonorailFrame.add(comboBoxStrategy); - MonorailFrame.add(buttonStep); - MonorailFrame.setVisible(true); + AirplaneFrame.add(canv); + AirplaneFrame.add(buttonCreate); + AirplaneFrame.add(buttonCreateAirFighter); + AirplaneFrame.add(UpButton); + AirplaneFrame.add(DownButton); + AirplaneFrame.add(LeftButton); + AirplaneFrame.add(RightButton); + AirplaneFrame.add(comboBoxStrategy); + AirplaneFrame.add(buttonStep); + AirplaneFrame.setVisible(true); } } class Canvas extends JComponent{