From: SourceForge.net <no...@so...> - 2006-10-24 14:49:29
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3977754 By: vasko_ Hello, I've come across a problem with recognizing JTextField components with the Mathcher class. Can't figure out, what's the problem, when there are many textfields on one tab in the GUI and the following code returns a null reference: JTextField txtfield = (JTextField) getFinder().find( postajaliscaView, new Matcher() { public boolean matches(Component c) { return c.getClass().equals(JTextField.class) && ((JTextField)c).getName().equals(component_name);}}); Where component_name is the name of the component, set with the setName() method and postajaliscaView is the View component, which holds about 10 text fields. The above code works fine, when i work with JFormattedTextField instead of JTextField, it returns just the right reference for the component I need. Any suggestions, what should I do? I can't change the whole source to use JFormattedTextField instead of JTextField, just to make the tests work. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=168262 |