A: 
comboBox.getSelectedItem();

public String getSortText() {
    return sortText.getText();
}

All this can easily be found in the Java DOCs from SUN.

--edit-- updated my answer to really make sure you understand :)

willcodejavaforfood
Oh, Big Thanks!
Stefan
A: 

For JTextField use myTextField.getText() For tooltip in JTextField use myTextField.getToolTipText() For JComboBox use myComboBox.getSelectedIndex() or myComboBox.getSelectedItem() First gives you the index of the selected item and he second gives you the actual item.

kovica
Thanks! But when I do it I get an error massage from eclipse "The method getText() is undefined for the type String" must I change my variable from String?
Stefan