Two Laptop Bag*
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
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: 38481
    
  23
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?