static S getText(final JTextComponent c) { ret c == null ? "" : (S) swingAndWait(func { c.getText() }); } static S getText(final JLabel l) { ret l == null ? "" : (S) swingAndWait(func { l.getText() }); } // returns the contents of text field for editable combo box static S getText(final JComboBox cb) { if (isEditable(cb)) ret str(cb.getSelectedItem()); else ret unnull((S) cb.getEditor().getItem()); }