List of usage examples for java.awt.event ContainerEvent getSource
public Object getSource()
From source file:ec.display.StatisticsChartPane.java
/** * This method initializes this/*from www . j av a 2 s . c o m*/ * * @return void */ private void initialize() { this.setSize(300, 200); this.addContainerListener(new java.awt.event.ContainerAdapter() { public void componentRemoved(java.awt.event.ContainerEvent e) { StatisticsChartPane pane = (StatisticsChartPane) e.getSource(); if (pane.getTabCount() < 1) { pane.getParent().remove(pane); } } }); }