🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18293

processKeyEvent

#18293
From: Stuart Morse
Date: Thu, 16 Jul 1998 00:00
27 lines
1203 bytes
Hi,

I've been using processKeyEvent in a class that inherits from
java.awt.TextField to map
lower case characters to upper case as shown below:

   public void processKeyEvent(KeyEvent e)
   {
       char keyChar = e.getKeyChar();
       Character tst = new Character(' ');

       if(tst.getType(keyChar) == tst.LOWERCASE_LETTER)
           e.setKeyChar(tst.toUpperCase(keyChar));
       super.processKeyEvent(e);

   }

It worked fine in JBuilder 1.0 but no longer works in JBuilder 2.0. I
traced the
program in the debugger and found that the character is being mapped
properly
in the KeyEvent, but the lower case character still displays in the text
field.

Any ideas?

Stuart Morse
Technical Details
Message-ID: <35AE879E.665D2613@cpsc.ucalgary.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,6b7c237cf37748fb,start
X-Google-Attributes: gidf74b3,public
From: Stuart Morse <morse@cpsc.ucalgary.ca>
Subject: processKeyEvent
Date: 1998/07/16
Message-ID: <35AE879E.665D2613@cpsc.ucalgary.ca>
X-Deja-AN: 372181269
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language