Re: set cusror inside a JTextField



Max010 wrote:
....
can anyone tell me please why when i launch my GUI and click on the Log
IN button the cursor does not appear inside the tableNoField??


void logInButton_mouseClicked(MouseEvent e) {
userNoTextField.setVisible(false);
orderBillPanel.setVisible(true);
menuPanel.setVisible(true);
beveragesPanel.setVisible(true);
ingredientsChoiceButton.setEnabled(true);
billButton.setEnabled(true);
multiplesChoicePanel.setVisible(true);
tablePanel.setVisible(true);
tableNoField.requestFocus();
}

Looking at your snippet, I came up with a dozen possible
reasons why it is not working as you expect it to (before
I stopped counting).

People could help you better if you posted a self contained,
short version containing *just* one button and one textfield.

Andrew T.

.