Here you can find the source of getTextComponent(JComboBox combo)
Parameter | Description |
---|---|
combo | The combo box. |
public static final JTextComponent getTextComponent(JComboBox combo)
//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(); } }