Exemplo n.º 1
0
 public boolean action(Event evt, Object what) {
   if (evt.target instanceof MenuItem) {
     // Since we didn't save references to each of the menu objects,
     // we check which one was pressed by comparing labels.
     if (((String) evt.arg).equals("Run")) {
       for (int i = 0; i < 360; i++) {
         act.rotateX(1);
         renderer.render();
       }
     }
   }
   System.out.println("Event: " + evt + " Object: " + what);
   return super.action(evt, what);
 }