customize.swing.startMain.java Source code

Java tutorial

Introduction

Here is the source code for customize.swing.startMain.java

Source

package customize.swing;

import java.awt.*;
import javax.swing.border.*;
import com.intellij.uiDesigner.core.*;
import customize.main.GeneratorSqlmap;
import customize.xmlParse.request.RequestModel;
import org.apache.commons.lang3.StringUtils;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;

/**
 * @author Liukx
 * @create 2017-03-10 9:38
 * @email liukx@elab-plus.com
 **/
public class startMain extends JDialog {
    private JButton ButtonView2;
    private JButton ButtonView3;
    private JButton ButtonView4;
    JFileChooser jfc = new JFileChooser();// 

    public startMain() {
        initComponents();
        initComponents();
        jfc.setCurrentDirectory(new File("d://"));// ?d
        genButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                //
                String text = TextField.getText();
                //?
                String text1 = textField3.getText();
                if (StringUtils.isBlank(text)) {
                    JOptionPane.showMessageDialog(null, "??!!");
                    return;
                }
                if (StringUtils.isBlank(text1)) {
                    JOptionPane.showMessageDialog(null, "??!!");
                    return;
                }
                if (StringUtils.isBlank(rootTextField.getText())) {
                    JOptionPane.showMessageDialog(null, "???!!");
                    return;
                }
                if (StringUtils.isBlank(PasswordField.getText())) {
                    JOptionPane.showMessageDialog(null, "??!!");
                    return;
                }
                if (StringUtils.isBlank(textField8.getText())) {
                    JOptionPane.showMessageDialog(null, "???!!");
                    return;
                }
                if (StringUtils.isBlank(textField2.getText())) {
                    JOptionPane.showMessageDialog(null, "?!!");
                    return;
                }

                String xml = "";
                String model = "";
                String dao = "";

                xml = textField6.getText();
                model = textField7.getText();
                dao = textField1.getText();

                if (StringUtils.isBlank(xml)) {
                    xml = "./";
                }
                if (StringUtils.isBlank(model)) {
                    model = "./";
                }
                if (StringUtils.isBlank(dao)) {
                    dao = "./";
                }

                RequestModel requestModel = new RequestModel();
                requestModel.setDriverClass(text);
                requestModel.setConnectionURL(text1);
                requestModel.setUserId(rootTextField.getText());
                requestModel.setPassword(PasswordField.getText());
                requestModel.setTableName(textField8.getText());
                requestModel.setProjectPath(textField2.getText());
                requestModel.setXmlPackage(xml);
                requestModel.setModelPackage(model);
                requestModel.setInterfacePackage(dao);

                if (CheckBox1.isSelected()) {
                    requestModel.setUseActualColumnNames(false);
                }

                if (!CheckBox2.isSelected()) {
                    requestModel.setSuppressAllComments(false);
                }

                GeneratorSqlmap generatorSqlmap = new GeneratorSqlmap();
                try {
                    generatorSqlmap.generator(requestModel);
                    JOptionPane.showMessageDialog(null, "?~");
                    File file = new File(textField2.getText());
                    java.awt.Desktop.getDesktop().open(file.getParentFile());
                } catch (Exception e1) {
                    JOptionPane.showMessageDialog(null, "~  :" + e1.getMessage());
                    e1.printStackTrace();
                }

            }
        });
        ButtonView.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (e.getSource().equals(ButtonView)) {// ?
                    setTextValue(textField2);
                }
            }
        });

    }

    private void setTextValue(JTextField text) {
        jfc.setFileSelectionMode(1);// ?
        int state = jfc.showOpenDialog(null);// ????
        if (state == 1) {
            return;
        } else {
            File f = jfc.getSelectedFile();// f
            text.setText(f.getAbsolutePath());
        }
    }

    public static void main(String[] args) {
        JFrame frame = new JFrame("startMain");
        frame.setContentPane(new startMain().panel1);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
        frame.setBounds(500, 300, 983, 587);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        // Generated using JFormDesigner Evaluation license - unknown
        panel1 = new JPanel();
        JPanel panel2 = new JPanel();
        JScrollPane scrollPane1 = new JScrollPane();
        JPanel panel3 = new JPanel();
        JPanel panel4 = new JPanel();
        JPanel panel5 = new JPanel();
        textField6 = new JTextField();
        JPanel panel6 = new JPanel();
        JLabel label1 = new JLabel();
        JPanel panel7 = new JPanel();
        JLabel label2 = new JLabel();
        JPanel panel8 = new JPanel();
        JLabel label3 = new JLabel();
        JPanel panel9 = new JPanel();
        textField2 = new JTextField();
        ButtonView = new JButton();
        JPanel panel10 = new JPanel();
        textField7 = new JTextField();
        JPanel panel11 = new JPanel();
        textField1 = new JTextField();
        JPanel panel12 = new JPanel();
        JLabel label4 = new JLabel();
        JPanel panel13 = new JPanel();
        CheckBox1 = new JCheckBox();
        CheckBox2 = new JCheckBox();
        JPanel panel14 = new JPanel();
        genButton = new JButton();
        JScrollPane scrollPane2 = new JScrollPane();
        JPanel panel15 = new JPanel();
        JPanel panel16 = new JPanel();
        TextField = new JTextField();
        JPanel panel17 = new JPanel();
        textField3 = new JTextField();
        JPanel panel18 = new JPanel();
        rootTextField = new JTextField();
        JPanel panel19 = new JPanel();
        PasswordField = new JPasswordField();
        JPanel panel20 = new JPanel();
        textField8 = new JTextField();
        JPanel panel21 = new JPanel();
        JLabel label5 = new JLabel();
        JPanel panel22 = new JPanel();
        JLabel label6 = new JLabel();
        JPanel panel23 = new JPanel();
        JLabel label7 = new JLabel();
        JPanel panel24 = new JPanel();
        JLabel label8 = new JLabel();
        JPanel panel25 = new JPanel();
        JLabel label9 = new JLabel();
        JScrollPane scrollPane3 = new JScrollPane();
        jscrollPane1 = new JTextPane();

        //======== panel1 ========
        {

            // JFormDesigner evaluation mark
            panel1.setBorder(new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    panel1.getBorder()));
            panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent e) {
                    if ("border".equals(e.getPropertyName()))
                        throw new RuntimeException();
                }
            });

            panel1.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));

            //======== panel2 ========
            {
                panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));

                //======== scrollPane1 ========
                {
                    scrollPane1.setBorder(new TitledBorder("\u6587\u4ef6\u751f\u6210\u5730\u5740"));

                    //======== panel3 ========
                    {
                        panel3.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));

                        //======== panel4 ========
                        {
                            panel4.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //======== panel5 ========
                            {
                                panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                                //---- textField6 ----
                                textField6.setEditable(true);
                                textField6.setEnabled(true);
                                textField6.setText("");
                                textField6.putClientProperty("html.disable", false);
                                panel5.add(textField6,
                                        new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                                GridConstraints.FILL_HORIZONTAL,
                                                GridConstraints.SIZEPOLICY_CAN_GROW
                                                        | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                            }
                            panel4.add(panel5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));
                        }
                        panel3.add(panel4,
                                new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel6 ========
                        {
                            panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- label1 ----
                            label1.setText("xml\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b");
                            panel6.add(label1,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                            GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel6,
                                new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel7 ========
                        {
                            panel7.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- label2 ----
                            label2.setText("model\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b");
                            panel7.add(label2,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                            GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel7,
                                new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel8 ========
                        {
                            panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- label3 ----
                            label3.setText("\u6587\u4ef6\u7edf\u4e00\u751f\u6210\u8def\u5f84");
                            panel8.add(label3,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                            GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel8,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel9 ========
                        {
                            panel9.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
                            panel9.add(textField2,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                            GridConstraints.FILL_HORIZONTAL,
                                            GridConstraints.SIZEPOLICY_CAN_GROW
                                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));

                            //---- ButtonView ----
                            ButtonView.setText("\u6d4f\u89c8");
                            panel9.add(ButtonView,
                                    new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                            GridConstraints.FILL_HORIZONTAL,
                                            GridConstraints.SIZEPOLICY_CAN_SHRINK
                                                    | GridConstraints.SIZEPOLICY_CAN_GROW,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel9,
                                new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel10 ========
                        {
                            panel10.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- textField7 ----
                            textField7.setEditable(true);
                            textField7.setEnabled(true);
                            textField7.setText("");
                            textField7.putClientProperty("html.disable", true);
                            panel10.add(textField7,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                            GridConstraints.FILL_HORIZONTAL,
                                            GridConstraints.SIZEPOLICY_CAN_GROW
                                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel10,
                                new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel11 ========
                        {
                            panel11.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- textField1 ----
                            textField1.setEditable(true);
                            textField1.setEnabled(true);
                            textField1.setText("");
                            textField1.putClientProperty("html.disable", true);
                            panel11.add(textField1,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                            GridConstraints.FILL_HORIZONTAL,
                                            GridConstraints.SIZEPOLICY_CAN_GROW
                                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel11,
                                new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));

                        //======== panel12 ========
                        {
                            panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- label4 ----
                            label4.setText("dao\u5c42\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b");
                            panel12.add(label4,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                            GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel3.add(panel12,
                                new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_BOTH,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        null, null, null));
                    }
                    scrollPane1.setViewportView(panel3);
                }
                panel2.add(scrollPane1,
                        new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                        | GridConstraints.SIZEPOLICY_WANT_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                        | GridConstraints.SIZEPOLICY_WANT_GROW,
                                null, null, null));
            }
            panel1.add(panel2,
                    new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                            null));

            //======== panel13 ========
            {
                panel13.setBorder(new TitledBorder("\u53ef\u914d\u7f6e\u9879"));
                panel13.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));

                //---- CheckBox1 ----
                CheckBox1.setSelected(true);
                CheckBox1.setText("\u662f\u5426\u4e3a\u9a7c\u5cf0\u547d\u540d\u89c4\u8303");
                panel13.add(CheckBox1,
                        new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_FIXED, null, null, null));

                //---- CheckBox2 ----
                CheckBox2.setSelected(true);
                CheckBox2.setText("\u662f\u5426\u751f\u6210\u6ce8\u91ca");
                panel13.add(CheckBox2,
                        new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            }
            panel1.add(panel13,
                    new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                            null));

            //======== panel14 ========
            {
                panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                //---- genButton ----
                genButton.setText("\u751f\u6210");
                panel14.add(genButton,
                        new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_HORIZONTAL,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            }
            panel1.add(panel14,
                    new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                            null));

            //======== scrollPane2 ========
            {
                scrollPane2.setBorder(new TitledBorder("\u5fc5\u586b\u9879"));

                //======== panel15 ========
                {
                    panel15.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));

                    //======== panel16 ========
                    {
                        panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- TextField ----
                        TextField.setText("com.mysql.jdbc.Driver");
                        panel16.add(TextField,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel16,
                            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel17 ========
                    {
                        panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- textField3 ----
                        textField3.setText("jdbc:mysql://192.168.0.13/mvp?characterEncoding=UTF-8");
                        panel17.add(textField3,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel17,
                            new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel18 ========
                    {
                        panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- rootTextField ----
                        rootTextField.setText("root");
                        panel18.add(rootTextField,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel18,
                            new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel19 ========
                    {
                        panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- PasswordField ----
                        PasswordField.setText("elab@123");
                        panel19.add(PasswordField,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel19,
                            new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel20 ========
                    {
                        panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- textField8 ----
                        textField8.setText("");
                        panel20.add(textField8,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel20,
                            new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel21 ========
                    {
                        panel21.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label5 ----
                        label5.setText("\u6570\u636e\u5e93\u9a71\u52a8:");
                        panel21.add(label5,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel21,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel22 ========
                    {
                        panel22.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label6 ----
                        label6.setText("\u6570\u636e\u5e93\u8fde\u63a5\u5730\u5740:");
                        panel22.add(label6,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel22,
                            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel23 ========
                    {
                        panel23.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label7 ----
                        label7.setText("\u6570\u636e\u5e93\u7528\u6237\u540d:");
                        panel23.add(label7,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel23,
                            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel24 ========
                    {
                        panel24.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label8 ----
                        label8.setText("\u6570\u636e\u5e93\u5bc6\u7801:");
                        panel24.add(label8,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel24,
                            new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel25 ========
                    {
                        panel25.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label9 ----
                        label9.setText("\u8868\u540d(\u53ef\u6a21\u7cca%)");
                        panel25.add(label9,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel15.add(panel25,
                            new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));
                }
                scrollPane2.setViewportView(panel15);
            }
            panel1.add(scrollPane2,
                    new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                            null, null, null));

            //======== scrollPane3 ========
            {
                scrollPane3.setBorder(new TitledBorder("\u6ce8\u610f\u4e8b\u9879"));

                //---- jscrollPane1 ----
                jscrollPane1.setEditable(true);
                jscrollPane1.setEnabled(true);
                jscrollPane1.setText(
                        "\t1.\u8bf7\u4e0d\u8981\u91cd\u590d\u751f\u6210\u540c\u6837\u7684\u6587\u4ef6\u5728\u540c\u4e00\u4e2a\u76ee\u5f55\u5939\u4e0b\u3002");
                scrollPane3.setViewportView(jscrollPane1);
            }
            panel1.add(scrollPane3,
                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                            null, null, null));
        }
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    // Generated using JFormDesigner Evaluation license - unknown
    private JPanel panel1;
    private JTextField textField6;
    private JTextField textField2;
    private JButton ButtonView;
    private JTextField textField7;
    private JTextField textField1;
    private JCheckBox CheckBox1;
    private JCheckBox CheckBox2;
    private JButton genButton;
    private JTextField TextField;
    private JTextField textField3;
    private JTextField rootTextField;
    private JPasswordField PasswordField;
    private JTextField textField8;
    private JTextPane jscrollPane1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}