Package javax.swing

Examples of javax.swing.JComboBox.addFocusListener()


      }
    }
    final JComboBox comboBox;
    if (dce == null) {
      comboBox = new JComboBox();
      comboBox.addFocusListener(AttributeTable.focusListener);
      comboBox.getEditor().getEditorComponent().addFocusListener(AttributeTable.focusListener);
      comboBox.setRenderer(new TypedListCellRenderer());
      dce = new DefaultCellEditor(comboBox) {
            public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int col) {
                return super.getTableCellEditorComponent(table, ((AttributeTable)table).getValueForEdit(row, col), isSelected, row, col);
View Full Code Here


    comboBox = new JComboBox(posDistributions);

    comboBox.setSelectedIndex(0);
    comboBox.addActionListener(myEventHandler);
    comboBox.addFocusListener(myEventHandler);
    positionDistributionBox = comboBox;
    label.setLabelFor(comboBox);

    smallPane.add(label);
    smallPane.add(Box.createHorizontalStrut(10));
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public JPanel getPanel() {
        final JPanel rootPanel = new JPanel(new BorderLayout());       
        final JComboBox choiseBox = new JComboBox(GraphConfigurationReader.getGraphNames());
        choiseBox.addFocusListener(new FocusAdapter() {
            @Override
            public void focusLost(final FocusEvent event) {
                final String itemName = choiseBox.getSelectedItem().toString();
                GraphDbImporter.getInstance().setGraph(GraphConfigurationReader.getGraph(itemName));
            }
View Full Code Here

    comboBox = new JComboBox(posDistributions);

    comboBox.setSelectedIndex(0);
    comboBox.addActionListener(myEventHandler);
    comboBox.addFocusListener(myEventHandler);
    positionDistributionBox = comboBox;
    label.setLabelFor(comboBox);

    smallPane.add(label);
    smallPane.add(Box.createHorizontalStrut(10));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.