private void cbdmnstatItemStateChanged(java.awt.event.ItemEvent evt) {
if(evt.getsource()==getSelectedItem){
tf1.setFocus(true);
}
}
private void cbdmnstatItemStateChanged(java.awt.event.ItemEvent evt) { if(evt.getsource()==getSelectedItem){ tf1.setFocus(true); } }
Share
Use this method to set the focus on your textfield.
javax.swing.JComponent#requestFocus()
In your case it would look like:
UPDATE
This will work for you, if your textfields and combobox-items are static, if they are dynamic it is getting a bit more complicated.