This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes What's the difference between a window being deactivated and losing focus? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "What Watch "What New topic
Author

What's the difference between a window being deactivated and losing focus?

Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

I have a class the extends JFrame and implements WindowListener and implements WindowFocusListener.

What is the difference between:

windowDeactivated() & windowLostFocus()

and

windowActivated() & windowGainedFocus()

??
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
Try this part of the Java Tutorial first, and see whether that helps.
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

Thanks. I should probably go through the entire Swing tutorial (and the demo SwingSet2).

Kaydell
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What's the difference between a window being deactivated and losing focus?