Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AscoltatoreMouse extends MouseAdapter{
- public void mousePressed(MouseEvent e){
- for(int i=0;i<numeri.length;i++){
- //if(e.getComponent() instanceof JButton)
- if(e.getSource() == numeri[i])
- casellaDiCalcolo.setText(numeri[i].getText());
- if(i<operatori.length)
- if(e.getSource() == operatori[i])
- casellaDiCalcolo.setText(operatori[i].getText());
- }//for
- }//mousePressed
- }//AscoltatoreMouse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement