This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a JPanel on which a JFileChooser is added. Now the focus (cursor) is always set to TextBox, which contains the file we choose from file chooser.
Now the problem is, I have to capture a key on this panel. But as the cursor always on the text box of JFileChooser, the key pressed event is not fired. If i remove the JFileChooser, the keyPressed event is fired.
How to fire a keyPressed event when JFileChooser is there on the panel, and i press a key.
Is there any way to remove focus from the text box?