Forums Register Login

Request Focus

+Pie Number of slices to send: Send
Friends,
In a dialog, I have a text field. I want to have focus in it, whenever the dialog shows. should I have jtxtseat.requesFocus() called before showing or after showing?
sometimes even if the cursor blinks, I am not able to type data w/o clicking on the field once. why is it so?
Help me.
+Pie Number of slices to send: Send
Hi Nagu,
Supply some more info or maybe even some code so we can give you an opinion. Is the dialog modal? Is it regenerated or reused?
Michael Morris
+Pie Number of slices to send: Send
I would think after show is where you want to call requestFocus().
Mark
this llama doesn't want your drama, he just wants this tiny ad for his mama
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 706 times.
Similar Threads
problem with JDialog (urgent) please help
Problem with keystrokes and JOptionPane
showInputDialog( ) focus
Setting initial focus in a Model JDialog
Dialog modality problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:25:10.