нопка 3button4=new JButton ( 4 raquo ;);//кнопка 4button5=new JButton ( 5 );//кнопка 5button6=new JButton ( 6 );//кнопка 6button7=new JButton ( 7 );//кнопка 7button8= new JButton ( 8 );//кнопка 8button9=new JButton ( 9 );//кнопка 9buttonSum=new JButton ( + );//кнопка + buttonBack=new JButton ( C raquo ;);//кнопка СbuttonDivide=new JButton (/);//кнопка/buttonSub=new JButton ( - );//кнопка -buttonMul=new JButton ( * );// кнопка * buttonStart=new JButton (=);//кнопка= 
  Розташуємо їх тепер у нашому вікні: 
  () {(300, 300, 300, 300); (new BorderLayout());(display,BorderLayout.NORTH);(buttonPanel,BorderLayout.CENTER);(buttonStart,BorderLayout.SOUTH);.add(button0);.add(button1);.add(button2);.add(button3);.add(button4);.add(button5);.add(button6);.add(button7);.add(button8);.add(button9);.add(buttonSum);.add(buttonSub);.add(buttonMul);.add(buttonBack);.add(buttonDivide);(true);
 } 
   Реалізуємо обробник події натискання на кнопку: 
 . addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 0 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 1 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 2 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 3 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 4 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 5 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 6 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 7 ); 
				
				
				
				
			 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 8 ); 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {.setText (display.getText () + 9 ); 
 } 
 }); 
   Операція C буде видаляти тільки останню цифру на дисплеї, якщо такі присутні: 
 . addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {temp=display.getText () ;. setText (temp.substring (0, temp.length () - 1)); 
 } 
 }); 
   Для реалізації інших операцій калькулятора додамо в наш клас 2 поля: firstValue і operation: 
  firstValue=0; operation= + raquo ;; 
   При виконанні операцій +, -, * і/ми повинні очистити екран і зберегти значення і операцію: 
 . addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {= Integer.valueOf (display.getText ()) ;. setText ( );= + raquo ;; 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {= Integer.valueOf (display.getText ()) ;. setText ( );= * raquo ;; 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {= Integer.valueOf (display.getText ()) ;. setText ( );=/ raquo ;; 
 } 
 }) ;. addActionListener (new ActionListener () {
  @ Overridevoid actionPerformed (ActionEvent e) {= Integer.valueOf (display.getText ()) ;. setText ( ); 
 operation= - raquo ;; } 
 }); 
   Залишилося реалізувати останню операцію =. При натисканні на дану кнопку калькулятор повин...