import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class CarFrame extends JFrame {
    JPanel contentPane;
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JLabel jLabel3 = new JLabel();
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JTextField jTextField1 = new JTextField();
    JTextField jTextField5 = new JTextField();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JComboBox jComboBox1 = new JComboBox();
    JComboBox jComboBox2 = new JComboBox();
    JRadioButton jRadioButton1 = new JRadioButton();
    JRadioButton jRadioButton2 = new JRadioButton();
    JLabel jLabel6 = new JLabel();
    JScrollPane jScrollPane1 = new JScrollPane();
    JTextArea jTextArea2 = new JTextArea();
    JLabel jLabel7 = new JLabel();
    JScrollPane jScrollPane2 = new JScrollPane();
    JTextArea jTextArea1 = new JTextArea();
    ButtonGroup buttonGroup1 = new ButtonGroup();
    public CarFrame() {
        try {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }
    private void jbInit() throws Exception {
        contentPane = (JPanel) getContentPane();
        contentPane.setLayout(null);
        setSize(new Dimension(499, 407));
        setTitle("Ϣ¼");
        jLabel1.setText("    ţ");
        jLabel1.setBounds(new Rectangle(25, 32, 60, 33));
        jLabel2.setText("Ʒ    ƣ");
        jLabel2.setBounds(new Rectangle(233, 40, 64, 26));
        jLabel3.setText("    ɫ");
        jLabel3.setBounds(new Rectangle(233, 74, 60, 33));
        jLabel4.setText("  أ");
        jLabel4.setBounds(new Rectangle(27, 73, 66, 33));
        jLabel5.setText("    ;");
        jLabel5.setBounds(new Rectangle(27, 117, 63, 31));
        jTextField1.setBounds(new Rectangle(96, 39, 122, 24));
        jTextField5.setBounds(new Rectangle(300, 77, 121, 27));
        jButton1.setBounds(new Rectangle(135, 347, 89, 36));
        jButton1.setText("ȷ  ");
      jButton1.addActionListener(new CarFrame_jButton1_actionAdapter(this));
        jButton2.setBounds(new Rectangle(274, 345, 91, 38));
        jButton2.setMnemonic('0');
        jButton2.setText(" ȡ   ");
      jButton2.addActionListener(new CarFrame_jButton2_actionAdapter(this));
        jComboBox1.setBounds(new Rectangle(300, 37, 119, 27));
        jComboBox2.setBounds(new Rectangle(96, 81, 119, 25));
        jRadioButton1.setSelected(true);
        jRadioButton1.setText("");
        jRadioButton1.setBounds(new Rectangle(96, 122, 74, 19));
        jRadioButton2.setText("");
        jRadioButton2.setBounds(new Rectangle(174, 121, 83, 21));
        jLabel6.setText("Ϣ");
        jLabel6.setBounds(new Rectangle(8, 209, 92, 55));
        jScrollPane1.setBounds(new Rectangle(94, 157, 335, 72));
        jLabel7.setText("");
        jLabel7.setBounds(new Rectangle(27, 154, 67, 37));
        jScrollPane2.setBounds(new Rectangle(95, 243, 333, 88));
        contentPane.add(jLabel4);
        contentPane.add(jLabel5);
        contentPane.add(jLabel1);
        contentPane.add(jRadioButton1);
        contentPane.add(jComboBox2);
        contentPane.add(jTextField1);
        contentPane.add(jScrollPane1);
        jScrollPane1.getViewport().add(jTextArea2);
        contentPane.add(jLabel2);
        contentPane.add(jLabel3);
        contentPane.add(jTextField5);
        contentPane.add(jComboBox1);
        contentPane.add(jLabel7);
        contentPane.add(jScrollPane2);
        jScrollPane2.getViewport().add(jTextArea1);
        contentPane.add(jButton1);
        contentPane.add(jButton2);
        contentPane.add(jRadioButton2);
        contentPane.add(jLabel6);
        buttonGroup1.add(jRadioButton1);
        buttonGroup1.add(jRadioButton2);
        jComboBox1.addItem("ݴ");
        jComboBox1.addItem("");
        jComboBox1.addItem("µ");
        jComboBox1.addItem("ִ");
        jComboBox2.addItem("");
        jComboBox2.addItem("");
        jComboBox2.addItem("Ϻ");
        jComboBox2.addItem("");
    }
    public static void main(String args[]) {
        CarFrame cf = new CarFrame();
        cf.setBounds(200, 200, 460, 440);
        cf.validate();
        cf.setVisible(true);
    }
    public void jButton1_actionPerformed(ActionEvent e) {
        jTextArea1.setText("");
        String carinfo = " ţ" + jTextField1.getText() +
                         "Ʒ ƣ" + jComboBox1.getSelectedItem() + "\n" +
                         "  أ" + jComboBox2.getSelectedItem()
                         + "    ɫ" + jTextField5.getText() + "\n" +
                         "";
        if (jRadioButton1.isSelected()) {
            carinfo = carinfo + jRadioButton1.getText();
        }
        if (jRadioButton2.isSelected()) {
            carinfo = carinfo + jRadioButton2.getText();
        }
        carinfo = carinfo + "\n" + jTextArea2.getText();
        jTextArea1.append(carinfo);
    }
    public void jButton2_actionPerformed(ActionEvent e) {
        jTextField1.setText("");
        jTextField5.setText("");
        jTextArea2.setText("");
    }
}
class CarFrame_jButton2_actionAdapter implements ActionListener {
    private CarFrame adaptee;
    CarFrame_jButton2_actionAdapter(CarFrame adaptee) {
        this.adaptee = adaptee;
    }
    public void actionPerformed(ActionEvent e) {
        adaptee.jButton2_actionPerformed(e);
    }
}
class CarFrame_jButton1_actionAdapter implements ActionListener {
    private CarFrame adaptee;
    CarFrame_jButton1_actionAdapter(CarFrame adaptee) {
        this.adaptee = adaptee;
    }
    public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }
}
