private DatabaseElement testButtonClick(ActionEvent evt, boolean showSuccessInfomationDialog) {
        DriverInfo selectedItem = (DriverInfo) driverComboBox.getSelectedItem();
        String name = textName.getText();
        String url = textUrl.getText();
        String username = textUsername.getText();
        String password = textPassword.getText();
        String schema = textSchema.getText();
        if (StringUtil.isEmpty(name)) {
            JOptionPane.showMessageDialog(this, "请输入 name.", "提示", JOptionPane.INFORMATION_MESSAGE);
            return null;
        }
        if (StringUtil.isEmpty(url)) {
            JOptionPane.showMessageDialog(this, "请输入 URL.", "提示", JOptionPane.INFORMATION_MESSAGE);
            return null;
        }
        if (StringUtil.isEmpty(username)) {
            JOptionPane.showMessageDialog(this, "请输入 Username.", "提示", JOptionPane.INFORMATION_MESSAGE);
            return null;
        }
//        if (StringUtil.isEmpty(password)) {
//            JOptionPane.showMessageDialog(this, "请输入 Password.", "提示", JOptionPane.INFORMATION_MESSAGE);
//            return null;
//        }
        Connection conn = null;
        try {
            DatabaseElement dbItem = new DatabaseElement(name, selectedItem.getDriverClass(), url, username, password, schema);
            conn = dbItem.connect();
            if (conn != null) {
                if (showSuccessInfomationDialog) {
                    JOptionPane.showMessageDialog(this, "连接成功.", "错误", JOptionPane.INFORMATION_MESSAGE);
                }
            } else {
                JOptionPane.showMessageDialog(this, "连接失败.", "错误", JOptionPane.INFORMATION_MESSAGE);
            }
            return dbItem;
        } catch (ClassNotFoundException cfe) {
            JOptionPane.showMessageDialog(this, "找不到你选择的 JDBC Driver 类.", "错误", JOptionPane.ERROR_MESSAGE);
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(this, e.getMessage(), "错误", JOptionPane.ERROR_MESSAGE);
        } finally {
            try {
                if(conn!=null){
                    conn.close();
                }
            } catch (SQLException e) {
            }
        }
        return null;
    }