Hello, I am creating a program and I'm using JComboBox and textfield. what i want is when ever the user selects an item from the ComboBox its supposed to show up text for example (A) in the textfield.
I'm trying to use if statement but i do know how please help
the combo box model contact :
5000
15000
20000
25000
30000
35000
40000
private void ServiceTypeTextFieldActionPerformed(java.awt.event.ActionEvent evt) { if (KmsComboBox.equals(5000)) { ServiceTypeTextField.setText("A Service"); } else { ServiceTypeTextField.setText(" "); } }