classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: javax.swing.JTextField


From: Christopher Lansdown
Subject: Re: javax.swing.JTextField
Date: Tue, 20 Dec 2005 09:46:11 -0500
User-agent: Mutt/1.5.9i

On 12/20, Roman Kennke wrote:
> Hi Christopher,
> 
> Am Montag, den 19.12.2005, 22:40 -0500 schrieb Christopher Lansdown:
> > Hi,
> > 
> > JTextField doesn't seem to send any ActionEvent's when VK_ENTER is pressed,
> > and looking through the source it doesn't seem to try to catch this.
> > 
> > Is anyone working on this currently?
> 
> Which version of Classpath have you tried?

CVS as of a day or two ago.

> I tested with current CVS HEAD and there it seems to work. And I believe,
> nobody worked on that in the last weeks, so it should at least be in 0.19
> too. You can find the associated sourcecode in javax/swing/JTextField.java
> starting at line 95 (the notifyAction stuff).

I apologize; I thought that the fileTextField of JFileChooser (in the Metal
plaf) had an action listener (as it should), but I looked more closely and
it doesn't. When I added it, the action event was indeed fired.

(In passing, I had read the code that you referred to; I simply didn't
know enough about the way keymaps were installed to recognize it as such.)

What's strange is that JFormattedTextField, which inherits from JTextField,
doesn't fire the action event... Oh, I see, it specifically overrides the
action map. Is it correct that JFormattedTextField's getActions() just
returns null, rather than invoking its super-class, or at least providing
the same action for the enter key?

> If you still have problems, I would like to see a testcase where it
> fails.

Many thanks,
Chris Lansdown

-- 
"Let us endeavor so to live that when we come to die even the undertaker 
will be sorry."  -- Mark Twain, "Pudd'nhead Wilson's Calendar"
========== Evil Overlord Quote of the Day (www.eviloverlord.com) =========
97. My dungeon cells will not be furnished with objects that contain
reflective surfaces or anything that can be unravelled. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]