Am I doing something wrong here? No compilation errors but code doesnt seem to be working. IF mobile number input is less than 11 numbers an error message dialog appears to alert the user then is supposed to focus on the text box in question. But instead after clicking the ok on the dialog box, the next rooms form shows up even though ive set that to setVisible(false). Any help would be appreciated. Thanks.
You will get better help if you post your SSCCE. With the code you post, we can just guess.
Are you sure the input does not have white spaces? If yes, they are a legal character which will be "counted" To get rid of them call trim()