Exemplo n.º 1
0
  @Override
  public void actionPerformed(ActionEvent e) {

    if (e.getSource() == spvp.getDeleteAllButton()) {
      Icy.getMainInterface().getSwimmingPool().removeAll();
    }
  }
Exemplo n.º 2
0
  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();
  }