Java Swing Tutorial - Java ComponentAdapter .componentHidden (ComponentEvent e)








Syntax

ComponentAdapter.componentHidden(ComponentEvent e) has the following syntax.

public void componentHidden(ComponentEvent e)

Example

In the following code shows how to use ComponentAdapter.componentHidden(ComponentEvent e) method.

import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
/*  ww  w  . j av a2s.  co  m*/
import javax.swing.JFrame;

public class Main extends ComponentAdapter {

  public void componentHidden(ComponentEvent evt) {
    System.out.println("componentHidden");
  }

  public static void main(String[] args) {
    JFrame frame = new JFrame("");
    frame.pack();

    frame.addComponentListener(new Main());
    frame.setVisible(true);
  }
}