Advertisement
tegusta

kjjnutyufugju

May 5th, 2013
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  class AscoltatoreMouse extends MouseAdapter{
  2.         public void mousePressed(MouseEvent e){
  3.             for(int i=0;i<numeri.length;i++){
  4.                 //if(e.getComponent() instanceof JButton)
  5.                 if(e.getSource() == numeri[i])
  6.                     casellaDiCalcolo.setText(numeri[i].getText());
  7.                 if(i<operatori.length)
  8.                     if(e.getSource() == operatori[i])
  9.                         casellaDiCalcolo.setText(operatori[i].getText());
  10.             }//for
  11.         }//mousePressed
  12.     }//AscoltatoreMouse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement