void createUI() throws Exception {
        final MenuHandler mHandler = this;
        serverListCB.setMaximumRowCount(24);

        this.setLayout(borderLayout1);
        serverListCB.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent ae) {
                checkDbSelect(ae);
            }
        });


        jLabel1.setText("Database server:");
        tabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
        tabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                tabbedPane_stateChanged(e);
            }
        });

        queryEditor.setText("<enter query>");
        queryEditor.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(KeyEvent e) {
                queryEditor_keyReleased(e);
            }
        });
        queryEditor.setFont(new java.awt.Font("Monospaced", 0, 12));
        queryEditor.setOpaque(true);
        queryEditor.setPreferredSize(new Dimension(97, 23));
        queryEditor.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                checkOptionMenu(e, QUERY_TAB);
            }
            public void mouseReleased(MouseEvent e) {
                checkOptionMenu(e, QUERY_TAB);
            }
        });
        queryEditor.addFocusListener(new FocusAdapter() {
            public void focusGained(FocusEvent fe) {
                SqlToolkit.menuManager.setCurrentOwner(mHandler);
            }
        });
        queryEditor.addCaretListener(new CaretListener() {
            public void caretUpdate(CaretEvent ce) {
                checkCopyStatus(ce);
            }
        });
        queryPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

        messageArea.setText("<no messages>");
        messageArea.setDisabledTextColor(Color.darkGray);
        messageArea.setEditable(false);
        messageArea.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                checkOptionMenu(e, MESSAGE_TAB);
            }
            public void mouseReleased(MouseEvent e) {
                checkOptionMenu(e, MESSAGE_TAB);
            }
        });
        messageArea.addFocusListener(new FocusAdapter() {
            public void focusGained(FocusEvent fe) {
                SqlToolkit.menuManager.setCurrentOwner(mHandler);
            }
        });

        jPanel1.setLayout(gridBagLayout1);
        jPanel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                checkOptionMenu(e, null);
            }
            public void mouseReleased(MouseEvent e) {
                checkOptionMenu(e, null);
            }
        });
        resultTable.setFont(new java.awt.Font("SansSerif", 0, 11));
        resultTable.setModel(resultTableModel);
        resultTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                checkOptionMenu(e, RESULTS_TAB);
            }
            public void mouseReleased(MouseEvent e) {
                checkOptionMenu(e, RESULTS_TAB);
            }
        });
        resultTable.addFocusListener(new FocusAdapter() {
            public void focusGained(FocusEvent fe) {
                SqlToolkit.menuManager.setCurrentOwner(mHandler);
            }
        });
        resultTable.setDefaultRenderer(double.class, new DecimalRenderer());
        resultTable.setDefaultRenderer(Double.class, new DecimalRenderer());
        resultTable.setDefaultRenderer(BigDecimal.class, new DecimalRenderer());
        resultTable.setDefaultRenderer(Clob.class, new ClobRenderer());
        resultTable.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent me) {
                if (me.getClickCount() == 2) {
                    int irow = resultTable.getSelectedRow();
                    int icol = resultTable.getSelectedColumn();
                    Object what = resultTable.getValueAt(irow, icol);
                    if (what != null  &&  what instanceof Clob) {
                        String line = "";
                        StringBuilder sbuf = new StringBuilder();
                        try {
                            Reader reader = ((Clob)what).getCharacterStream();
                            BufferedReader br = new BufferedReader(reader);
                            while ((line=br.readLine()) != null  &&  sbuf.length() < 255) {
                                sbuf.append(line);
                            }
                            br.close();
                        } catch(Exception ex) {
                            sbuf.append(" ... " + ex.getMessage());
                        }
                    }
                }
            }
        });

        resultPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        resultPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                checkOptionMenu(e, RESULTS_TAB);
            }
            public void mouseReleased(MouseEvent e) {
                checkOptionMenu(e, RESULTS_TAB);
            }
        });
        greenBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("greenLightOn.gif")));
        greenBtn.setMargin(new Insets(0, 2, 0, 2));
        greenBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                greenBtn_actionPerformed(e);
            }
        });
        greenBtn.setDebugGraphicsOptions(0);
        greenBtn.setToolTipText("start query");
        greenBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("greenLightOff.gif")));
        greenBtn.setFocusPainted(false);
        greenBtn.setHorizontalTextPosition(SwingConstants.TRAILING);

        yellowBtn.setEnabled(false);
        yellowBtn.setToolTipText("pause query");
        yellowBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("yellowLightOn.gif")));
        yellowBtn.setMargin(new Insets(0, 2, 0, 2));
        yellowBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                yellowBtn_actionPerformed(e);
            }
        });
        yellowBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("yellowLightOff.gif")));
        yellowBtn.setFocusPainted(false);

        redBtn.setEnabled(false);
        redBtn.setToolTipText("halt query");
        redBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("redLightOn.gif")));
        redBtn.setMargin(new Insets(0, 2, 0, 2));
        redBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                redBtn_actionPerformed(e);
            }
        });
        redBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("redLightOff.gif")));
        redBtn.setFocusPainted(false);

        histLastBtn.setEnabled(false);
        histLastBtn.setToolTipText("Last query");
        histLastBtn.setHorizontalTextPosition(SwingConstants.TRAILING);
        histLastBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("historyLastOn.gif")));
        histLastBtn.setMargin(new Insets(0, 0, 0, 0));
        histLastBtn.setText("");
        histLastBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                histLastBtn_actionPerformed(e);
            }
        });
        histLastBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("historyLastOff.gif")));
        histLastBtn.setFocusPainted(false);

        histNextBtn.setEnabled(false);
        histNextBtn.setToolTipText("Next query");
        histNextBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("historyNextOn.gif")));
        histNextBtn.setMargin(new Insets(0, 0, 0, 0));
        histNextBtn.setText("");
        histNextBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                histNextBtn_actionPerformed(e);
            }
        });
        histNextBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("historyNextOff.gif")));
        histNextBtn.setFocusPainted(false);

        histPrevBtn.setEnabled(false);
        histPrevBtn.setToolTipText("Previous query");
        histPrevBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("historyPrevOn.gif")));
        histPrevBtn.setMargin(new Insets(0, 0, 0, 0));
        histPrevBtn.setText("");
        histPrevBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                histPrevBtn_actionPerformed(e);
            }
        });
        histPrevBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("historyPrevOff.gif")));
        histPrevBtn.setFocusPainted(false);

        histFirstBtn.setEnabled(false);
        histFirstBtn.setToolTipText("First query");
        histFirstBtn.setIcon(new ImageIcon(QueryPanel.class.getResource("historyFirstOn.gif")));
        histFirstBtn.setMargin(new Insets(0, 0, 0, 0));
        histFirstBtn.setText("");
        histFirstBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                histFirstBtn_actionPerformed(e);
            }
        });
        histFirstBtn.setDisabledIcon(new ImageIcon(QueryPanel.class.getResource("historyFirstOff.gif")));
        histFirstBtn.setFocusPainted(false);

        autoCommitCB.setText("auto-commit");
        autoCommitCB.setToolTipText("Enable/disable auto-commit");
        autoCommitCB.setEnabled(true);
        autoCommitCB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setAutoCommitParams(autoCommitCB.isSelected(), true, false, true);
            }
        });

        jPanel3.setBorder(BorderFactory.createEtchedBorder());
        this.add(jPanel1, BorderLayout.NORTH);
        jPanel1.add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
                , GridBagConstraints.EAST, GridBagConstraints.NONE,
                new Insets(0, 6, 0, 2), 0, 0));
        jPanel1.add(serverListCB, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
                , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
                new Insets(5, 2, 5, 0), 0, 0));
        jPanel1.add(iconPanel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0
                , GridBagConstraints.CENTER, GridBagConstraints.NONE,
                new Insets(0, 0, 0, 0), 0, 0));

        iconPanel.add(autoCommitCB, null);
        iconPanel.add(greenBtn, null);
        iconPanel.add(yellowBtn, null);
        iconPanel.add(redBtn, null);
        iconPanel.add(jPanel3, null);
        jPanel3.add(histFirstBtn, null);
        jPanel3.add(histPrevBtn, null);
        jPanel3.add(histNextBtn, null);
        jPanel3.add(histLastBtn, null);

        this.add(tabbedPane, BorderLayout.CENTER);
    }