Java Utililty Methods JComboBox Text

List of utility methods to do JComboBox Text

Description

The list of methods to do JComboBox Text are organized into topic(s).

Method

StringconvertRawTextWithEOL(String rawText, JComboBox eolCombo)
convert Raw Text With EOL
return rawText.replaceAll("\n", getEOL(eolCombo));
voiddictsReset(ArrayList listDicts, HashMap DictBoxSpinner, HashMap DictBoxTextField, HashMap DictBoxComboBox, HashMap DictRadioButtonSpinner, HashMap DictRadioButtonTextField)
dicts Reset
DictBoxSpinner.clear();
DictBoxTextField.clear();
DictBoxComboBox.clear();
DictRadioButtonSpinner.clear();
DictRadioButtonTextField.clear();
listDicts.clear();
listDicts.add(DictBoxSpinner);
listDicts.add(DictBoxTextField);
...
StringgetComboBoxText(final JComboBox aComboBox)
get Combo Box Text
if (aComboBox == null) {
    return null;
Object value = aComboBox.getSelectedItem();
if (value instanceof String) {
    return (String) value;
if (value == null) {
...
StringgetComboBoxText(JComboBox comboBox)
get Combo Box Text
return ((JTextComponent) comboBox.getEditor().getEditorComponent()).getText();
JTextFieldgetJComboBoxJTextField(JComboBox comboBox)
get J Combo Box J Text Field
JTextField result = null;
ComboBoxEditor cbe = comboBox.getEditor();
if (cbe != null) {
    Component c = cbe.getEditorComponent();
    if (c instanceof JTextField) {
        result = (JTextField) c;
return result;
JTextComponentgetTextComponent(JComboBox combo)
Returns the text editor component for the specified combo box.
return (JTextComponent) combo.getEditor().getEditorComponent();
JTextFieldgetTextField(JComboBox comboBox)
Get text field from combobox
return (JTextField) comboBox.getEditor().getEditorComponent();
voidsetTextSizeMenu(JComboBox choice)
set Text Size Menu
choice.addItem("10");
choice.addItem("12");
choice.addItem("14");
choice.addItem("16");
choice.addItem("18");
choice.addItem("20");
choice.addItem("22");