Example usage for javax.swing WindowConstants DISPOSE_ON_CLOSE

List of usage examples for javax.swing WindowConstants DISPOSE_ON_CLOSE

Introduction

In this page you can find the example usage for javax.swing WindowConstants DISPOSE_ON_CLOSE.

Prototype

int DISPOSE_ON_CLOSE

To view the source code for javax.swing WindowConstants DISPOSE_ON_CLOSE.

Click Source Link

Document

The dispose-window default window close operation.

Usage

From source file:client.ui.UploadFileWindow.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*ww  w.j a  v a 2s . c  om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    filePathLabel = new JLabel();
    pathField = new JTextField();
    pathButton = new JButton();
    filenameLabel = new JLabel();
    filenameField = new JTextField();
    confirmButton = new JButton();
    filenameTip = new JLabel();

    FormListener formListener = new FormListener();

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("");
    setResizable(false);

    filePathLabel.setFont(new Font("", 0, 12)); // NOI18N
    filePathLabel.setText("");

    pathField.setFont(new Font("", 0, 12)); // NOI18N

    pathButton.setFont(new Font("", 0, 12)); // NOI18N
    pathButton.setText("?");
    pathButton.addActionListener(formListener);

    filenameLabel.setFont(new Font("", 0, 12)); // NOI18N
    filenameLabel.setText("??");

    filenameField.setFont(new Font("", 0, 12)); // NOI18N

    confirmButton.setFont(new Font("", 0, 12)); // NOI18N
    confirmButton.setText("");
    confirmButton.addActionListener(formListener);

    filenameTip.setFont(new Font("", 0, 12)); // NOI18N
    filenameTip.setForeground(new Color(153, 153, 153));
    filenameTip.setText("???");

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
                    .createSequentialGroup().addGap(19, 19, 19)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(filePathLabel).addComponent(filenameLabel))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(filenameTip)
                            .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                            .addComponent(pathField, GroupLayout.DEFAULT_SIZE, 213,
                                                    Short.MAX_VALUE)
                                            .addComponent(filenameField))
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(pathButton))))
                    .addGroup(layout.createSequentialGroup().addGap(167, 167, 167).addComponent(confirmButton)))
            .addContainerGap(33, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(filePathLabel)
                    .addComponent(pathField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(pathButton))
            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(filenameLabel)
                    .addComponent(filenameField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(filenameTip)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
            .addComponent(confirmButton).addContainerGap()));

    pack();
}

From source file:gtu._work.ui._DefaultJFrameUI.java

private void initGUI() {
    try {//from w  ww  .  j  a  v a 2s . c om
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                jTabbedPane1.addTab("jPanel1", null, jPanel1, null);
                {
                    srcPathText = new JTextField();
                    JCommonUtil.jTextFieldSetFilePathMouseEvent(srcPathText, true);
                    jPanel1.add(srcPathText);
                    srcPathText.setPreferredSize(new java.awt.Dimension(291, 24));
                }
                {
                    executeBtn = new JButton();
                    jPanel1.add(executeBtn);
                    executeBtn.setText("\u57f7\u884c");
                    executeBtn.setPreferredSize(new java.awt.Dimension(66, 39));
                    executeBtn.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            executeBtnActionPerformed(evt);
                        }
                    });
                }
            }
            {
                jPanel2 = new JPanel();
                BorderLayout jPanel2Layout = new BorderLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("jPanel2", null, jPanel2, null);
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel2.add(jScrollPane1, BorderLayout.CENTER);
                    jScrollPane1.setPreferredSize(new java.awt.Dimension(533, 334));
                    {
                        logArea = new JTextArea();
                        jScrollPane1.setViewportView(logArea);
                        logArea.setText("");
                    }
                }
            }
        }
        pack();
        this.setSize(554, 401);
    } catch (Exception e) {
        //add your error handling code here
        e.printStackTrace();
    }
}

From source file:gtu._work.ui.QuartzCronTestUI.java

private void initGUI() {
    try {//www. j  a  v  a  2 s.  co m
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                BorderLayout jPanel1Layout = new BorderLayout();
                jPanel1.setLayout(jPanel1Layout);
                jTabbedPane1.addTab("CronExpression", null, jPanel1, null);
                {
                    jPanel2 = new JPanel();
                    jPanel1.add(jPanel2, BorderLayout.NORTH);
                    jPanel2.setPreferredSize(new java.awt.Dimension(439, 34));
                    {
                        cronText = new JTextField();
                        jPanel2.add(cronText);
                        cronText.setText("");
                        cronText.setPreferredSize(new java.awt.Dimension(229, 27));
                    }
                    {
                        executeBtn = new JButton();
                        jPanel2.add(executeBtn);
                        executeBtn.setText("execute");
                        executeBtn.setPreferredSize(new java.awt.Dimension(85, 28));
                        executeBtn.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                //XXX
                                try {
                                    CronExpression cexp = new CronExpression(cronText.getText());
                                    Date current = new Date();
                                    setTitle(DateFormatUtils.format(current, "yyyy/MM/dd HH:mm:ss"));

                                    DefaultListModel cronListModel = new DefaultListModel();
                                    for (int ii = 0, total = Integer
                                            .parseInt(limitText.getText()); ii < total; ii++) {
                                        current = cexp.getNextValidTimeAfter(current);
                                        if (current == null) {
                                            break;
                                        }
                                        cronListModel.addElement(ii + " : "
                                                + DateFormatUtils.format(current, "yyyy/MM/dd HH:mm:ss"));
                                    }
                                    cronList.setModel(cronListModel);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    JCommonUtil.handleException(e);
                                    return;
                                }
                            }
                        });
                    }
                    {
                        limitText = new JTextField();
                        jPanel2.add(limitText);
                        limitText.setText("2000");
                        limitText.setPreferredSize(new java.awt.Dimension(61, 24));
                    }
                }
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel1.add(jScrollPane1, BorderLayout.CENTER);
                    jScrollPane1.setPreferredSize(new java.awt.Dimension(439, 253));
                    {
                        DefaultListModel cronListModel = new DefaultListModel();
                        cronList = new JList();
                        jScrollPane1.setViewportView(cronList);
                        cronList.setModel(cronListModel);
                    }
                }
            }
        }
        pack();
        this.setSize(460, 354);
    } catch (Exception e) {
        //add your error handling code here
        e.printStackTrace();
    }
}

From source file:gtu._work.ui.ObnfCheckPDFErrorUI.java

private void initGUI() {
    try {/*from ww  w .  ja  v  a 2s  .  com*/
        JCommonUtil.frameCloseConfirm(this);
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel2 = new JPanel();
                BorderLayout jPanel2Layout = new BorderLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("log", null, jPanel2, null);
                {
                    jScrollPane2 = new JScrollPane();
                    jPanel2.add(jScrollPane2, BorderLayout.CENTER);
                    {
                        logArea = new JTextArea();
                        jScrollPane2.setViewportView(logArea);
                    }
                }
                {
                    checkBtn = new JButton();
                    jPanel2.add(checkBtn, BorderLayout.SOUTH);
                    checkBtn.setText("\u6aa2\u67e5");
                    checkBtn.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            checkBtnActionPerformed();
                        }
                    });
                }
            }
        }
        pack();
        this.setSize(542, 394);
    } catch (Exception e) {
        //add your error handling code here
        e.printStackTrace();
    }
}

From source file:gtu.xml.xstream.iisi.MQDecodeUI.java

private void initGUI() {
    try {//from  w ww.j  a v  a  2  s . c  o  m
        JCommonUtil.defaultLookAndFeel();
        GridLayout thisLayout = new GridLayout(3, 1);
        thisLayout.setColumns(1);
        thisLayout.setHgap(5);
        thisLayout.setVgap(5);
        thisLayout.setRows(3);
        getContentPane().setLayout(thisLayout);
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        {
            beforeArea = new JTextArea();
            getContentPane().add(beforeArea);
        }
        {
            afterArea = new JTextArea();
            getContentPane().add(afterArea);
        }
        {
            jPanel1 = new JPanel();
            FlowLayout jPanel1Layout = new FlowLayout();
            getContentPane().add(jPanel1);
            jPanel1.setPreferredSize(new java.awt.Dimension(546, 38));
            jPanel1.setLayout(jPanel1Layout);
            {
                executeBtn = new JButton();
                jPanel1.add(executeBtn);
                executeBtn.setText("\u7522\u751f");
                executeBtn.setPreferredSize(new java.awt.Dimension(78, 22));
                executeBtn.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        try {
                            Validate.notBlank(beforeArea.getText(), "messgaeContent");
                            String msg2 = beforeArea.getText();

                            XmlParserImpl xmlParserImpl = new XmlParserImpl();
                            final String jmsMessageXML = StringCompressUtil.uncompress(msg2);
                            JmsMessageNew jmsMessageNew = (JmsMessageNew) xmlParserImpl
                                    .parseToObj(jmsMessageXML);
                            String returnMessage = jmsMessageNew.getMessageXML();
                            System.out.println(returnMessage);
                            afterArea.setText(returnMessage);
                            System.out.println("done...");
                        } catch (Exception ex) {
                            JCommonUtil.handleException(ex);
                        }
                    }
                });
            }
            {
                cleanBtn = new JButton();
                jPanel1.add(cleanBtn);
                cleanBtn.setText("\u6e05\u9664");
                cleanBtn.setPreferredSize(new java.awt.Dimension(78, 22));
                cleanBtn.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        try {
                            beforeArea.setText("");
                            afterArea.setText("");
                        } catch (Exception ex) {
                            JCommonUtil.handleException(ex);
                        }
                    }
                });
            }
        }
        pack();
        this.setSize(554, 402);
    } catch (Exception e) {
        //add your error handling code here
        e.printStackTrace();
    }
}

From source file:gtu.db.sqlMaker.DbSqlCreaterUI.java

private void initGUI() {
    try {//from  w ww. j av a  2  s. co  m
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                jTabbedPane1.addTab("jPanel1", null, jPanel1, null);
                {
                    jLabel1 = new JLabel();
                    jPanel1.add(jLabel1);
                    jLabel1.setText("URL");
                }
                {
                    urlText = new JTextField();
                    jPanel1.add(urlText);
                    urlText.setPreferredSize(new java.awt.Dimension(484, 24));
                    urlText.setText("jdbc:sqlserver://192.168.233.130:1433;DatabaseName=AAA03");
                }
                {
                    jLabel2 = new JLabel();
                    jPanel1.add(jLabel2);
                    jLabel2.setText("username");
                    jLabel2.setPreferredSize(new java.awt.Dimension(79, 17));
                }
                {
                    usernameText = new JTextField();
                    jPanel1.add(usernameText);
                    usernameText.setPreferredSize(new java.awt.Dimension(424, 24));
                    usernameText.setText("sa");
                }
                {
                    jLabel3 = new JLabel();
                    jPanel1.add(jLabel3);
                    jLabel3.setText("password");
                    jLabel3.setPreferredSize(new java.awt.Dimension(80, 17));
                }
                {
                    passwordText = new JTextField();
                    jPanel1.add(passwordText);
                    passwordText.setPreferredSize(new java.awt.Dimension(427, 24));
                    passwordText.setText("1234");
                }
                {
                    jLabel4 = new JLabel();
                    jPanel1.add(jLabel4);
                    jLabel4.setText("tablename");
                    jLabel4.setPreferredSize(new java.awt.Dimension(65, 17));
                }
                {
                    tablenameText = new JTextField();
                    jPanel1.add(tablenameText);
                    tablenameText.setPreferredSize(new java.awt.Dimension(434, 24));
                    tablenameText.setText("AAA03.dbo.address");
                }
                {
                    executeBtn = new JButton();
                    jPanel1.add(executeBtn);
                    executeBtn.setText("");
                    executeBtn.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            executeBtnActionPerformed(evt);
                        }
                    });
                }
            }
        }
        pack();
        this.setSize(558, 398);
        System.out.println("init ok!!");
    } catch (Exception e) {
        JCommonUtil.handleException(e);
    }
}

From source file:kenh.xscript.elements.Debug.java

/**
 * a dialog use to debug./*from  w ww . ja va 2  s . co  m*/
 */
public void process() {

    JDialog dialog = new JDialog((Frame) null, true);
    dialog.setTitle("Debugger");
    dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    dialog.setSize(750, 200);
    initial(dialog.getContentPane());
    dialog.setVisible(true);

    this.result = null;

}

From source file:gtu._work.etc.SqlReplacerUI.java

private void initGUI() {
    try {//  w  w  w.  j a  v  a  2  s.c  om
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                BorderLayout jPanel1Layout = new BorderLayout();
                jPanel1.setLayout(jPanel1Layout);
                jTabbedPane1.addTab("jPanel1", null, jPanel1, null);
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel1.add(jScrollPane1, BorderLayout.CENTER);
                    jScrollPane1.setPreferredSize(new java.awt.Dimension(387, 246));
                    {
                        jTextArea1 = new JTextArea();
                        jScrollPane1.setViewportView(jTextArea1);
                        jTextArea1.setText("");
                    }
                }
            }
            {
                jPanel2 = new JPanel();
                FlowLayout jPanel2Layout = new FlowLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("jPanel2", null, jPanel2, null);
                {
                    replaceFromText = new JTextField();
                    jPanel2.add(replaceFromText);
                    replaceFromText.setPreferredSize(new java.awt.Dimension(266, 22));
                }
                {
                    replaceToText = new JTextField();
                    jPanel2.add(replaceToText);
                    replaceToText.setPreferredSize(new java.awt.Dimension(266, 22));
                }
                {
                    execute = new JButton();
                    jPanel2.add(execute);
                    execute.setText("execute");
                    execute.setPreferredSize(new java.awt.Dimension(149, 42));
                    execute.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            try {
                                String text = jTextArea1.getText();
                                if (StringUtils.isBlank(text)) {
                                    JCommonUtil._jOptionPane_showMessageDialog_error("area empty!");
                                    return;
                                }

                                String fromTxt = replaceFromText.getText();
                                String toTxt = StringUtils.defaultString(replaceToText.getText());
                                if (StringUtils.isBlank(fromTxt)) {
                                    JCommonUtil._jOptionPane_showMessageDialog_error("fromTxt empty!");
                                    return;
                                }

                                StringBuffer sb = new StringBuffer();
                                Pattern ptn = Pattern.compile("(.){0,1}" + fromTxt + "(.){0,1}",
                                        Pattern.CASE_INSENSITIVE);
                                Matcher mth = null;

                                String[] scopeStrs = { ",", " ", "(", ")", "[", "]" };
                                BufferedReader reader = new BufferedReader(new StringReader(text));

                                for (String line = null; (line = reader.readLine()) != null;) {
                                    mth = ptn.matcher(line);
                                    while (mth.find()) {
                                        String scope1 = mth.group(1);
                                        String scope2 = mth.group(2);
                                        boolean ok1 = scope1.length() == 0
                                                || StringUtils.indexOfAny(scope1, scopeStrs) != -1;
                                        boolean ok2 = scope2.length() == 0
                                                || StringUtils.indexOfAny(scope2, scopeStrs) != -1;
                                        if (ok1 && ok2) {
                                            mth.appendReplacement(sb, scope1 + toTxt + scope2);
                                        }
                                    }
                                    mth.appendTail(sb);
                                    sb.append("\n");
                                }

                                reader.close();
                                jTextArea1.setText(sb.toString());
                            } catch (Exception e) {
                                JCommonUtil.handleException(e);
                            }
                        }

                    });
                }
            }
        }
        pack();
        setSize(400, 300);
    } catch (Exception e) {
        //add your error handling code here
        e.printStackTrace();
    }
}

From source file:gtu.xml.work.CacDBUI4Janna.java

private void initGUI() {
    try {/*from   w  w  w  . j av  a  2s  .c  om*/
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                GridLayout jPanel1Layout = new GridLayout(10, 2, 5, 5);
                jPanel1.setLayout(jPanel1Layout);
                jTabbedPane1.addTab("jPanel1", null, jPanel1, null);
                {
                    jLabel1 = new JLabel();
                    jPanel1.add(jLabel1);
                    jLabel1.setText("\u8cc7\u6599\u8868\u540d\u7a31");
                }
                {
                    ComboBoxModel tableNameComboModel = new DefaultComboBoxModel(
                            new String[] { "cac_fcase", "cac_ecase", "cac_fcase_count" });
                    tableNameCombo = new JComboBox();
                    jPanel1.add(tableNameCombo);
                    tableNameCombo.setModel(tableNameComboModel);
                }
                {
                    jLabel2 = new JLabel();
                    jPanel1.add(jLabel2);
                    jLabel2.setText("xml\u6a94\u6848\u4f86\u6e90");
                }
                {
                    srcFileText = new JTextField();
                    JCommonUtil.jTextFieldSetFilePathMouseEvent(srcFileText, false);
                    jPanel1.add(srcFileText);
                }
                {
                    jLabel3 = new JLabel();
                    jPanel1.add(jLabel3);
                    jLabel3.setText("\u7522\u751fsql\u6a94\u540d");
                }
                {
                    destFileNameText = new JTextField();
                    jPanel1.add(destFileNameText);
                }
                {
                    jLabel4 = new JLabel();
                    jPanel1.add(jLabel4);
                    jLabel4.setText("dmv\u6b04\u4f4d\u503c");
                }
                {
                    dmvText = new JTextField();
                    jPanel1.add(dmvText);
                }
                {
                    executeBtn = new JButton();
                    jPanel1.add(executeBtn);
                    executeBtn.setText("\u57f7\u884c");
                    executeBtn.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            executeBtnActionPerformed(evt);
                        }
                    });
                }
            }
        }
        pack();
        this.setSize(541, 361);
    } catch (Exception e) {
        // add your error handling code here
        e.printStackTrace();
    }
}

From source file:com.mirth.connect.client.ui.RegexAttachmentDialog.java

public RegexAttachmentDialog(AttachmentHandlerProperties properties) {
    super(PlatformUI.MIRTH_FRAME, true);
    this.parent = PlatformUI.MIRTH_FRAME;

    setTitle("Set Attachment Properties");
    getContentPane().setBackground(UIConstants.BACKGROUND_COLOR);
    setLayout(new MigLayout("novisualpadding, hidemode 3, insets 12", "[fill, grow]"));
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setPreferredSize(new Dimension(650, 550));

    initComponents();/*from   ww w  .  ja va  2  s  .c  o m*/
    initLayout();
    initInboundReplacementTable();
    initOutboundReplacementTable();

    attachmentHandlerProperties = properties;

    regexTextField.setText(
            StringUtils.defaultIfEmpty(attachmentHandlerProperties.getProperties().get("regex.pattern"), ""));
    regexTextField.requestFocus();
    regexTextField.addFocusListener(new FocusAdapter() {

        @Override
        public void focusGained(FocusEvent e) {
            if (initialFocus) {
                regexTextField.setCaretPosition(0);
                initialFocus = false;
            }
        }

    });
    mimeTypeField.setText(
            StringUtils.defaultIfEmpty(attachmentHandlerProperties.getProperties().get("regex.mimetype"), ""));

    int count = 0;
    while (attachmentHandlerProperties.getProperties().containsKey("regex.replaceKey" + count)) {
        DefaultTableModel tableModel = (DefaultTableModel) inboundReplacementTable.getModel();
        tableModel.addRow(
                new Object[] { attachmentHandlerProperties.getProperties().get("regex.replaceKey" + count),
                        attachmentHandlerProperties.getProperties().get("regex.replaceValue" + count) });
        count++;
    }

    count = 0;
    while (attachmentHandlerProperties.getProperties().containsKey("outbound.regex.replaceKey" + count)) {
        DefaultTableModel tableModel = (DefaultTableModel) outboundReplacementTable.getModel();
        tableModel.addRow(new Object[] {
                attachmentHandlerProperties.getProperties().get("outbound.regex.replaceKey" + count),
                attachmentHandlerProperties.getProperties().get("outbound.regex.replaceValue" + count) });
        count++;
    }

    setLocationRelativeTo(parent);
    setVisible(true);
}