Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2003, 10:49 AM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Focus Problem with JTextField+InputVerifier

Hi. Sorry, my english is bad (is very ...telegraphic), I speak spanish.

I have a JTable with custom editors (JPanel with a JTextField inside). This JTable is inside a JInternalFrame (MDI application). I set a input verifier to the JTextField, its show a error dialog (is a JOptionPane, I use the workaround for the #4532517), but when press "Ok" in the error dialog, the focus goes to the JToolBar of the main JFrame (???), not to the JTextField.

PD: I try with textfield.requestFocus() in the shouldYieldFocus(), but this not work. Searching, I find this article:
http://www.javaworld.com/javaworld/j...2-traps_p.html
but the propose solution (call the requestFocus() in SwingUtilities.invokeLater()) doesnt work for me (the call to requestFocus() and requestFocusInWindows() return false; textfield.isFocusable() return true, but textfield.isDisplayable() return false! Some idea?)

Thanks in advanced.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Group box control Tab Focus problem suji C# 0 September 26th, 2008 01:26 AM
Focus dhoward Javascript 3 September 19th, 2007 02:54 AM
Tell me following problem of lost focus amit_mande@yahoo.com VB.NET 2002/2003 Basics 1 November 13th, 2006 12:42 PM
Validate JTextField Cute Designer J2EE 3 November 28th, 2004 03:08 PM
Setting focus on a JTextField when an applet runs cs21cw Java GUI 1 January 1st, 2004 05:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.