cursorType.setMaximumSize(new java.awt.Dimension(32767, 20)); cursorType.setMinimumSize(new java.awt.Dimension(126, 20)); cursorType.setPreferredSize(new java.awt.Dimension(130, 20)); DefaultComboBoxModel l_comboModel = new DefaultComboBoxModel(); l_comboModel.addElement(DEFAULT_CURSOR); l_comboModel.addElement(EQUALITY_CURSOR); l_comboModel.addElement(GREATER_CURSOR); l_comboModel.addElement(LESS_CURSOR); l_comboModel.addElement(REGEX_CURSOR); cursorType.setModel(l_comboModel); cursorType.setMaximumRowCount(5);
    private void initGUI()    {        addWindowListener(new java.awt.event.WindowAdapter()        {            public void windowClosing(java.awt.event.WindowEvent evt)            {                closeDialog();            }        });        pack();        setTitle("Index On Attribute '" + index.getAttribute() + "'");        setBounds(new java.awt.Rectangle(0, 0, 512, 471));        getContentPane().add(mainPnl, java.awt.BorderLayout.CENTER);        mainPnl.setLayout(new java.awt.BorderLayout());        mainPnl.add(tabbedPane, java.awt.BorderLayout.CENTER);        tabbedPane.add(listPnl, "Listing");        listPnl.setLayout(new java.awt.GridBagLayout());        listPnl.add(            cursorPnl,            new java.awt.GridBagConstraints(                0,                0,                1,                1,                1.0,                0.15,                java.awt.GridBagConstraints.NORTH,                java.awt.GridBagConstraints.BOTH,                new java.awt.Insets(15, 0, 30, 0),                0,                0));        listPnl.add(            resultsPnl,            new java.awt.GridBagConstraints(                0,                1,                1,                1,                1.0,                0.8,                java.awt.GridBagConstraints.CENTER,                java.awt.GridBagConstraints.BOTH,                new java.awt.Insets(0, 0, 0, 0),                0,                0));        listPnl.add(            buttonPnl,            new java.awt.GridBagConstraints(                0,                2,                1,                1,                1.0,                0.05,                java.awt.GridBagConstraints.CENTER,                java.awt.GridBagConstraints.BOTH,                new java.awt.Insets(0, 0, 0, 0),                0,                0));        cursorPnl.setLayout(new java.awt.GridBagLayout());        cursorPnl.setBorder(            javax.swing.BorderFactory.createTitledBorder(                javax.swing.BorderFactory.createLineBorder(                    new java.awt.Color(153, 153, 153),                    1),                "Display Cursor Constraints",                javax.swing.border.TitledBorder.LEADING,                javax.swing.border.TitledBorder.TOP,                new java.awt.Font("SansSerif", 0, 14),                new java.awt.Color(60, 60, 60)));        cursorPnl.add(            jLabel1,            new java.awt.GridBagConstraints(                0,                1,                1,                1,                0.0,                0.0,                java.awt.GridBagConstraints.WEST,                java.awt.GridBagConstraints.NONE,                new java.awt.Insets(0, 15, 0, 10),                0,                0));        cursorPnl.add(            keyText,            new java.awt.GridBagConstraints(                1,                1,                1,                1,                0.4,                0.0,                java.awt.GridBagConstraints.WEST,                java.awt.GridBagConstraints.BOTH,                new java.awt.Insets(5, 5, 5, 236),                0,                0));        cursorPnl.add(            jLabel2,            new java.awt.GridBagConstraints(                0,                0,                1,                1,                0.0,                0.0,                java.awt.GridBagConstraints.WEST,                java.awt.GridBagConstraints.NONE,                new java.awt.Insets(0, 15, 0, 10),                0,                0));        cursorPnl.add(            cursorType,            new java.awt.GridBagConstraints(                1,                0,                1,                1,                0.4,                0.0,                java.awt.GridBagConstraints.WEST,                java.awt.GridBagConstraints.NONE,                new java.awt.Insets(5, 5, 5, 0),                0,                0));        resultsPnl.setLayout(new java.awt.BorderLayout());        resultsPnl.setBorder(            javax.swing.BorderFactory.createTitledBorder(                javax.swing.BorderFactory.createLineBorder(                    new java.awt.Color(153, 153, 153),                    1),                "Scan Results",                javax.swing.border.TitledBorder.LEADING,                javax.swing.border.TitledBorder.TOP,                new java.awt.Font("SansSerif", 0, 14),                new java.awt.Color(60, 60, 60)));        resultsPnl.add(jScrollPane2, java.awt.BorderLayout.CENTER);        jScrollPane2.getViewport().add(resultsTbl);        buttonPnl.setLayout(            new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 15, 5));        buttonPnl.add(doneBut);        buttonPnl.add(scanBut);        doneBut.setText("Done");        doneBut.addActionListener(new ActionListener()        {            public void actionPerformed(ActionEvent e)            {                closeDialog();            }        });        jLabel1.setText("Key Constraint:");        keyText.setText("");        keyText.setMinimumSize(new java.awt.Dimension(130, 20));        keyText.setPreferredSize(new java.awt.Dimension(130, 20));        keyText.setMaximumSize(new java.awt.Dimension(130, 20));        keyText.setFont(            new java.awt.Font("SansSerif", java.awt.Font.PLAIN, 14));        keyText.setSize(new java.awt.Dimension(130, 20));        jLabel2.setText("Cursor Type:");        cursorType.setMaximumSize(new java.awt.Dimension(32767, 20));        cursorType.setMinimumSize(new java.awt.Dimension(126, 20));        cursorType.setPreferredSize(new java.awt.Dimension(130, 20));        DefaultComboBoxModel l_comboModel = new DefaultComboBoxModel();        l_comboModel.addElement(DEFAULT_CURSOR);        l_comboModel.addElement(EQUALITY_CURSOR);        l_comboModel.addElement(GREATER_CURSOR);        l_comboModel.addElement(LESS_CURSOR);        l_comboModel.addElement(REGEX_CURSOR);        cursorType.setModel(l_comboModel);        cursorType.setMaximumRowCount(5);        scanBut.setText("Scan");        scanBut.addActionListener(new ActionListener()        {            public void actionPerformed(ActionEvent e)            {                doScan(                    keyText.getText(),                    (String) cursorType.getSelectedItem());            }        });        doScan(null, DEFAULT_CURSOR);    }