0
How to unfocus a jtextfield?
I have jdialog which contains one jtextfield(for search feature) and one jtable made in netbeans but its initially focus on jtextfield .How can I unfocus the jtextfield from the start? Can someone help me!
4 Antworten
+ 2
Totski Please google it before you ask the question
https://stackoverflow.com/questions/10773132/how-to-unfocus-a-jtextfield
+ 1
This from Sakshi (less active) link doesn't help?
Use requestFocusInWindow() to set focus on some other component rather then your JTextfield first.
But i'd suggest not to alter the native focus system, rather setText(String s) on the JTextField after initComponents() call in the constructor (assumed to be in netbeans).
Further optional reading: How to Use the Focus Subsystem
Do you try nextFocusableComponent property in NetBeans property editor for your JMenuItem
I fixed it, I used ur code twice, on startup, and when I click on the Jmenuitem, thanks
+ 1
Totski The link is working, I checked it, if the link is not working from your side then google it you can easily get that answer
0
I dont see any solution from the link you provided sir. Pls help me