Abstract Class WindowAdapter in Java

Abstract Class WindowAdapter in Java:

WindowAdapter is an implementation of the WindowListener interface. It contains empty bodies for each of the methods of WindowListener. When we do not need to implement all the methods of WindowListener interface, Subclass -WindowAdapter helps us there.

The structure of WindowAdapter is given as:


public abstract class WindowAdapter extends Object implements WindowListener {
// Constructor: 
public WindowAdapter();
//Methods
public void windowActivated(WindowEvent e); 
public void windowClosed(WindowEvent e); 
public void windowClosing(WindowEvent e); 
public void windowDeactivated(WindowEvent e); 
public void windowDeiconified(WindowEvent e); 
public void windowIconified(WindowEvent e); 
public void windowOpened(WindowEvent e); 
} 

The details of the class structure are given as follows:

public void windowActivated(WindowEvent e); 

public void windowActivated(WindowEvent e); method actually does nothing .We need to override this function to be notified when a window is activated.

Parameter
e – The event that has occurred.

public void windowClosed(WindowEvent e); 

public void windowClosed(WindowEvent e); method actually does nothing .We need to override this function to be notified when a window is closed.

Parameter
e – The event that has occurred.

public void windowClosing(WindowEvent e); 

public void windowClosing(WindowEvent e); method actually does nothing .We need to override this function to be notified when a window is in the process of closing.

Parameter
e – The event that has occurred.

public void windowDeactivated(WindowEvent e); 

public void windowDeactivated(WindowEvent e); method actually does nothing .We need to override this function to be notified when a window is deactivated.

Parameter
e – The event that has occurred.

public void windowDeiconified(WindowEvent e); 

public void windowDeiconified(WindowEvent e); method actually does nothing .We need to override this function to be notified when an iconified window is restored.

See also  EventObject Class in Java

Parameter
e – The event that has occurred.

public void windowIconified(WindowEvent e); 

public void windowIconified(WindowEvent e); method actually does nothing .We need to override this function to be notified when a window is iconified (minimized).

Parameter
e – The event that has occurred.

public void windowOpened(WindowEvent e); 

public void windowOpened(WindowEvent e); method actually does nothing .We need to override this function to be notified when a window is opened.

Parameter
e – The event that has occurred.

Share and Enjoy !

One thought on “Abstract Class WindowAdapter in Java

  1. Leverage scalable technologies and robust integrations to handle world-class multichannel eCommerce backend operations. The new version is here to help companies re-imagine multichannel selling administration. After helping our 7000+ clients procedure 31+ million orders worth 1.27 Billion of Gross Merchandise Value (GMV), we recently updated SelluSeller based on learnings to alter the way eCommerce is perceived and handled in Asia Pacific. SelluSeller is now incredibly powerful, faster, smoother, and enables you to streamline your end-to-end multi-channel advertising operations. The platform enables Brands, Retailers, Distributors, SMEs, and Service Providers such as yourself to conduct analytics-driven selling operations on a robust, feature-rich, and incredibly user-friendly interface.

Leave a Reply

Your email address will not be published. Required fields are marked *