62 lines
2.0 KiB
Java
62 lines
2.0 KiB
Java
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);
|
|
}
|
|
|
|
|
|
|
|
}
|