Exemplo n.º 1
0
 public void actionPerformed(ActionEvent event) {
   PanImage1 panImage1 = new PanImage1();
   PanImage2 panImage2 = new PanImage2();
   PanImage3 panImage3 = new PanImage3();
   revalidate();
   if (event.getSource() == btnClick) {
     if (nImg == 0) {
       nImg = 3;
     } else {
       nImg--;
     }
   } else if (event.getSource() == btnClick2) {
     if (nImg == 4) {
       nImg = 1;
     } else {
       nImg++;
     }
   } else if (event.getSource() == btnClick3) {
     System.exit(0);
   }
   if (nImg == 1) {
     add(panImage1);
   }
   if (nImg == 2) {
     add(panImage2);
   }
   if (nImg == 3) {
     add(panImage3);
   }
 }
Exemplo n.º 2
0
  public void actionPerformed(ActionEvent e) {
    final String command = e.getActionCommand();

    if (OPEN_CSV_FILE.equals(command)) {
      final JFileChooser chooser = new JFileChooser(System.getProperty("user.home"));
      final FileFilter filter = new CVSFileFilter();
      chooser.setFileFilter(filter);
      final int returnVal = chooser.showOpenDialog(this);
      if (returnVal == JFileChooser.APPROVE_OPTION) {
        // setCvsFile(chooser.getSelectedFile().getPath());
      }

    } else if (EXIT.equals(command)) {
      windowClosingEvent(null);
    }

    if (EXIT.equals(command)) windowClosingEvent(null);
  }
Exemplo n.º 3
0
 protected void windowClosingEvent(final WindowEvent e) {
   System.exit(0);
 }