@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == spvp.getDeleteAllButton()) { Icy.getMainInterface().getSwimmingPool().removeAll(); } }
public SwimmingPoolViewer() { mainFrame.getContentPane().setLayout(new BorderLayout()); mainFrame.getContentPane().add(spvp, BorderLayout.CENTER); mainFrame.setVisible(true); mainFrame.setPreferredSize(new Dimension(400, 400)); mainFrame.addToDesktopPane(); mainFrame.center(); mainFrame.pack(); Icy.getMainInterface().getSwimmingPool().addListener(this); spvp.getDeleteAllButton().addActionListener(this); refreshGUI(); mainFrame.requestFocus(); }