Beispiel #1
0
  protected void loadIcons() {
    int i;
    java.net.URL imageURL = null;
    for (i = 0; i < planeIconPaths.length; i++) {
      try {
        imageURL = new java.net.URL(atc_obj.codeBase + planeIconPaths[i]);
      } catch (Exception e) {
        imageURL = null;
      }

      if (imageURL == null) {
        System.err.println("Can't load icon " + i);
        atc_obj.stopATC();
      }
      planeIcons[i] = new ImageIcon(imageURL);
    }
  }
Beispiel #2
0
 public void keyTyped(KeyEvent e) {
   char key = e.getKeyChar();
   if (key == '\n') atc_obj.getInputhandler().processCommand();
   else atc_obj.getInputhandler().processKey(key);
 }
Beispiel #3
0
 public void windowClosing(WindowEvent event) {
   atc_obj.stopATC();
 }
Beispiel #4
0
 public void actionPerformed(ActionEvent e) {
   atc_obj.getInputhandler().processActionCommand(e.getActionCommand());
 }