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); + } + + + +}