From 6e69f8b10087d7b089c9bf1932a4efb81c51a4f7 Mon Sep 17 00:00:00 2001 From: Danila_Mochalov Date: Tue, 15 Nov 2022 17:10:04 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=20=D1=84=D0=BE=D1=80=D0=BC=D1=83=20=D1=81=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0=D0=BC=D0=B8,=20=D1=83?= =?UTF-8?q?=D0=BA=D1=80=D0=B0=D1=88=D0=B0=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FormLocomotive.java | 2 +- FormLocomotiveConfig.form | 337 ++++++++++++++++++++++++++++++++++++++ FormLocomotiveConfig.java | 61 +++++++ 3 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 FormLocomotiveConfig.form create mode 100644 FormLocomotiveConfig.java diff --git a/FormLocomotive.java b/FormLocomotive.java index 53a92cc..65ce9c5 100644 --- a/FormLocomotive.java +++ b/FormLocomotive.java @@ -107,6 +107,6 @@ public class FormLocomotive extends JComponent{ super.repaint(); } public static void main(String[] args) { - new FormMapWithSetLocomotives(); + new FormLocomotiveConfig(); } } diff --git a/FormLocomotiveConfig.form b/FormLocomotiveConfig.form new file mode 100644 index 0000000..5a7c514 --- /dev/null +++ b/FormLocomotiveConfig.form @@ -0,0 +1,337 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/FormLocomotiveConfig.java b/FormLocomotiveConfig.java new file mode 100644 index 0000000..d7b351d --- /dev/null +++ b/FormLocomotiveConfig.java @@ -0,0 +1,61 @@ +import javax.swing.*; +import java.awt.*; + +public class FormLocomotiveConfig extends JFrame{ + private JPanel FormPanel; + private JPanel ParametersPanel; + private JPanel CreatePanel; + private JPanel ColorPanel; + private JPanel StatsPanel; + private JLabel SpeedLabel; + private JSpinner SpeedSpinner; + private JLabel WeightLabel; + private JSpinner WeightSpinner; + private JCheckBox PipeCheckBox; + private JCheckBox FuelCheckBox; + private JLabel SimpleObjectLabel; + private JLabel AdvancedObjectLabel; + private JLabel SimpleWheelsLabel; + private JLabel StarWheelsLabel; + private JLabel RoundWheelsLabel; + private JSpinner WheelsCountSpinner; + private JLabel WheelsCountLabel; + private JPanel RedColorPanel; + private JPanel GreenColorPanel; + private JPanel BlueColorPanel; + private JPanel YellowColorPanel; + private JPanel WhiteColorPanel; + private JPanel BlackColorPanel; + private JPanel AquaColorPanel; + private JPanel PurpleColorPanel; + private JLabel MainColorLabel; + private JLabel ExtraColorLabel; + private JPanel ObjectViewPanel; + private JButton AddButton; + private JButton CancelButton; + + public FormLocomotiveConfig() { + + // Добавили цветные границы + SimpleObjectLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + AdvancedObjectLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + SimpleWheelsLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + RoundWheelsLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + StarWheelsLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + MainColorLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + ExtraColorLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + + + + + + + setContentPane(FormPanel); + setSize(800, 500); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setVisible(true); + } + + + +}