In JDK 1.1.7 does a JWindow generate a WINDOW_DEACTIVATED WindowEvent?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ken_Lowther
Posted On:   Friday, April 6, 2001 02:25 PM

I've written code (using 1.1.2) to have a JWindow disappear as soon as the user clicks/switches focus to somewhere outside its display (so it loses focus/activation). The problem is that I need to run with 1.1.7 and it seems the JWindow never generates the WINDOW_DEACTIVATED WindowEvent, so the JWindow never closes. In my JWindow subclass' processEvent I trap the WINDOW_DEACTIVATED WindowEvent event and call setVisible(false) and dispose().

My test driver involve a JFrame containing a JButton. When the JButton is clicked, the subclassed JWindow is displayed. The code I've written runs in 1.2.2 just fine. Any help would be appreciated.

Re: In JDK 1.1.7 does a JWindow generate a WINDOW_DEACTIVATED WindowEvent?

Posted By:   Ken_Lowther  
Posted On:   Monday, April 9, 2001 11:50 AM

Actually, the problem doesn't seem to be a difference between 1.2.2 and 1.1.7, but more like one between VisualAge and VisualCafe. I have to use Cafe since Visual Age doesn't support multiple JVMs and I need to use JDK 1.1.7 for this applet. I'll post my test code upon request.

Thanks,

Ken
About | Sitemap | Contact