Java JComboBox Text getTextComponent(JComboBox combo)

Here you can find the source of getTextComponent(JComboBox combo)

Description

Returns the text editor component for the specified combo box.

License

BSD License

Parameter

Parameter Description
combo The combo box.

Return

The text component.

Declaration

public static final JTextComponent getTextComponent(JComboBox combo) 

Method Source Code

//package com.java2s;
/*/*from  ww  w  . java2  s.c om*/
 * 09/08/2005
 *
 * UIUtil.java - Utility methods for org.fife.rsta.ui classes.
 * This library is distributed under a modified BSD license.  See the included
 * RSTAUI.License.txt file for details.
 */

import javax.swing.JComboBox;

import javax.swing.text.JTextComponent;

public class Main {
    /**
     * Returns the text editor component for the specified combo box.
     *
     * @param combo The combo box.
     * @return The text component.
     */
    public static final JTextComponent getTextComponent(JComboBox combo) {
        return (JTextComponent) combo.getEditor().getEditorComponent();
    }
}

Related

  1. convertRawTextWithEOL(String rawText, JComboBox eolCombo)
  2. dictsReset(ArrayList listDicts, HashMap DictBoxSpinner, HashMap DictBoxTextField, HashMap DictBoxComboBox, HashMap DictRadioButtonSpinner, HashMap DictRadioButtonTextField)
  3. getComboBoxText(final JComboBox aComboBox)
  4. getComboBoxText(JComboBox comboBox)
  5. getJComboBoxJTextField(JComboBox comboBox)
  6. getTextField(JComboBox comboBox)
  7. setTextSizeMenu(JComboBox choice)