> Programming Languages > Java
Various Topics Home | Disclaimer | Report Adult Posts

Various Topics on Java



Java - "textfield stole focus from applet" in Programming Languages


Old 09-06-2004   #1
..d.. ..u
 
Default textfield stole focus from applet

I have a paint program and say when i paint a square in the paint()
function, I was able to c**** the square then use up/down/left/right
to move it. However, after I added a textfield to my applet, the
keyListener does not work anymore; the square no longer moves. I
understand that the textfield is probably the first component in my
program which stole the focus and somehow causing conflict with my
keyListener. How can i lose defocus the textfield and get it back to
the applet (the default focus before the introduction of textfield).
Or how can i requestFocus on the applet without the focus
automactically slipping back to the textfield?
 
Old 09-06-2004   #2
..dr.. ..omps..
 
Default Re: textfield stole focus from applet

On 5 Sep 2004 20:32:35 -0700, Eddie Hsu wrote:

> I have a paint program ..


Code?
<http://www.physci.org/codes/sscce.jsp>

>..and say when i paint ..


Let the code (mostly) do the talking.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 

Thread Tools
Display Modes





Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0