コード例 #1
0
  public void actionPerformed(ActionEvent e) {

    parent
        .getParent()
        .getGrid()
        .setHeatMap(species.getSelectedItem().toString()); // I now regret the parent model
    parent.getParent().refresh();
  }
コード例 #2
0
 public void actionPerformed(ActionEvent e) {
   if (e.getSource().equals(save)) new GridSaver(grid, fileName());
   if (e.getSource().equals(load)) {
     GridLoader gl = new GridLoader(grid, fileName());
     try {
       grid.setMap(gl.read());
     } catch (IOException ioex) {
       System.out.println("File load Failed ioex");
     }
   }
   parent.getParent().refresh();
 }