Guest User

Untitled

a guest
Jan 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.87 KB | None | 0 0
  1. public class Calculator extends javax.swing.JFrame {
  2.  
  3. /** Creates new form Calculator */
  4. //zmienne
  5. double plusminus;
  6. double firstDouble;
  7. double secondDouble;
  8. double totalDouble;
  9.  
  10. //sprawdzanie dla przycisnięcia danego buttonika
  11. int plusClick;
  12. int minusClick;
  13. int multiplyClick;
  14. int divideClick;
  15. int decimalClick;
  16.  
  17. public Calculator() {
  18. initComponents();
  19. }
  20.  
  21. /** This method is called from within the constructor to
  22. * initialize the form.
  23. * WARNING: Do NOT modify this code. The content of this method is
  24. * always regenerated by the Form Editor.
  25. */
  26. @SuppressWarnings("unchecked")
  27. // <editor-fold defaultstate="collapsed" desc="Generated Code">
  28. private void initComponents() {
  29.  
  30. jPanel1 = new javax.swing.JPanel();
  31. display = new javax.swing.JTextField();
  32. jButton1 = new javax.swing.JButton();
  33. jButton2 = new javax.swing.JButton();
  34. jButton3 = new javax.swing.JButton();
  35. jButton4 = new javax.swing.JButton();
  36. jButton5 = new javax.swing.JButton();
  37. jButton6 = new javax.swing.JButton();
  38. jButton7 = new javax.swing.JButton();
  39. jButton8 = new javax.swing.JButton();
  40. jButton9 = new javax.swing.JButton();
  41. jButton10 = new javax.swing.JButton();
  42. clear = new javax.swing.JButton();
  43. decimal = new javax.swing.JButton();
  44. plus = new javax.swing.JButton();
  45. minus = new javax.swing.JButton();
  46. multiplay = new javax.swing.JButton();
  47. divide = new javax.swing.JButton();
  48. posneg = new javax.swing.JButton();
  49. equals = new javax.swing.JButton();
  50.  
  51. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  52. setTitle("Kalkulator v1.0");
  53.  
  54. jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  55.  
  56. display.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  57.  
  58. jButton1.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  59. jButton1.setText("1");
  60. jButton1.addActionListener(new java.awt.event.ActionListener() {
  61. public void actionPerformed(java.awt.event.ActionEvent evt) {
  62. jButton1ActionPerformed(evt);
  63. }
  64. });
  65.  
  66. jButton2.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  67. jButton2.setText("2");
  68. jButton2.addActionListener(new java.awt.event.ActionListener() {
  69. public void actionPerformed(java.awt.event.ActionEvent evt) {
  70. jButton2ActionPerformed(evt);
  71. }
  72. });
  73.  
  74. jButton3.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  75. jButton3.setText("3");
  76. jButton3.addActionListener(new java.awt.event.ActionListener() {
  77. public void actionPerformed(java.awt.event.ActionEvent evt) {
  78. jButton3ActionPerformed(evt);
  79. }
  80. });
  81.  
  82. jButton4.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  83. jButton4.setText("4");
  84. jButton4.addActionListener(new java.awt.event.ActionListener() {
  85. public void actionPerformed(java.awt.event.ActionEvent evt) {
  86. jButton4ActionPerformed(evt);
  87. }
  88. });
  89.  
  90. jButton5.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  91. jButton5.setText("5");
  92. jButton5.addActionListener(new java.awt.event.ActionListener() {
  93. public void actionPerformed(java.awt.event.ActionEvent evt) {
  94. jButton5ActionPerformed(evt);
  95. }
  96. });
  97.  
  98. jButton6.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  99. jButton6.setText("6");
  100. jButton6.addActionListener(new java.awt.event.ActionListener() {
  101. public void actionPerformed(java.awt.event.ActionEvent evt) {
  102. jButton6ActionPerformed(evt);
  103. }
  104. });
  105.  
  106. jButton7.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  107. jButton7.setText("7");
  108. jButton7.addActionListener(new java.awt.event.ActionListener() {
  109. public void actionPerformed(java.awt.event.ActionEvent evt) {
  110. jButton7ActionPerformed(evt);
  111. }
  112. });
  113.  
  114. jButton8.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  115. jButton8.setText("8");
  116. jButton8.addActionListener(new java.awt.event.ActionListener() {
  117. public void actionPerformed(java.awt.event.ActionEvent evt) {
  118. jButton8ActionPerformed(evt);
  119. }
  120. });
  121.  
  122. jButton9.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  123. jButton9.setText("9");
  124. jButton9.addActionListener(new java.awt.event.ActionListener() {
  125. public void actionPerformed(java.awt.event.ActionEvent evt) {
  126. jButton9ActionPerformed(evt);
  127. }
  128. });
  129.  
  130. jButton10.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  131. jButton10.setText("0");
  132. jButton10.addActionListener(new java.awt.event.ActionListener() {
  133. public void actionPerformed(java.awt.event.ActionEvent evt) {
  134. jButton10ActionPerformed(evt);
  135. }
  136. });
  137.  
  138. clear.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  139. clear.setText("C");
  140. clear.addActionListener(new java.awt.event.ActionListener() {
  141. public void actionPerformed(java.awt.event.ActionEvent evt) {
  142. clearActionPerformed(evt);
  143. }
  144. });
  145.  
  146. decimal.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  147. decimal.setText(".");
  148. decimal.addActionListener(new java.awt.event.ActionListener() {
  149. public void actionPerformed(java.awt.event.ActionEvent evt) {
  150. decimalActionPerformed(evt);
  151. }
  152. });
  153.  
  154. plus.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  155. plus.setText("+");
  156. plus.addActionListener(new java.awt.event.ActionListener() {
  157. public void actionPerformed(java.awt.event.ActionEvent evt) {
  158. plusActionPerformed(evt);
  159. }
  160. });
  161.  
  162. minus.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  163. minus.setText("-");
  164. minus.addActionListener(new java.awt.event.ActionListener() {
  165. public void actionPerformed(java.awt.event.ActionEvent evt) {
  166. minusActionPerformed(evt);
  167. }
  168. });
  169.  
  170. multiplay.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  171. multiplay.setText("x");
  172. multiplay.addActionListener(new java.awt.event.ActionListener() {
  173. public void actionPerformed(java.awt.event.ActionEvent evt) {
  174. multiplayActionPerformed(evt);
  175. }
  176. });
  177.  
  178. divide.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  179. divide.setText("/");
  180. divide.addActionListener(new java.awt.event.ActionListener() {
  181. public void actionPerformed(java.awt.event.ActionEvent evt) {
  182. divideActionPerformed(evt);
  183. }
  184. });
  185.  
  186. posneg.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  187. posneg.setText("+/-");
  188. posneg.addActionListener(new java.awt.event.ActionListener() {
  189. public void actionPerformed(java.awt.event.ActionEvent evt) {
  190. posnegActionPerformed(evt);
  191. }
  192. });
  193.  
  194. equals.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  195. equals.setText("=");
  196. equals.addActionListener(new java.awt.event.ActionListener() {
  197. public void actionPerformed(java.awt.event.ActionEvent evt) {
  198. equalsActionPerformed(evt);
  199. }
  200. });
  201.  
  202. javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  203. jPanel1.setLayout(jPanel1Layout);
  204. jPanel1Layout.setHorizontalGroup(
  205. jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  206. .addGroup(jPanel1Layout.createSequentialGroup()
  207. .addGap(22, 22, 22)
  208. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  209. .addGroup(jPanel1Layout.createSequentialGroup()
  210. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  211. .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  212. .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  213. .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
  214. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  215. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  216. .addGroup(jPanel1Layout.createSequentialGroup()
  217. .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  218. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  219. .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  220. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  221. .addComponent(multiplay, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
  222. .addGroup(jPanel1Layout.createSequentialGroup()
  223. .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  224. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  225. .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  226. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  227. .addComponent(minus, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
  228. .addGroup(jPanel1Layout.createSequentialGroup()
  229. .addComponent(clear, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  230. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  231. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  232. .addGroup(jPanel1Layout.createSequentialGroup()
  233. .addGap(10, 10, 10)
  234. .addComponent(equals, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  235. .addGroup(jPanel1Layout.createSequentialGroup()
  236. .addComponent(decimal, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  237. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  238. .addComponent(divide, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))))))
  239. .addComponent(display, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)
  240. .addGroup(jPanel1Layout.createSequentialGroup()
  241. .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  242. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  243. .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  244. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  245. .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
  246. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  247. .addComponent(plus, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
  248. .addComponent(posneg, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
  249. .addGap(20, 20, 20))
  250. );
  251. jPanel1Layout.setVerticalGroup(
  252. jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  253. .addGroup(jPanel1Layout.createSequentialGroup()
  254. .addComponent(display, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  255. .addGap(11, 11, 11)
  256. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  257. .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  258. .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  259. .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  260. .addComponent(plus, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
  261. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  262. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  263. .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  264. .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  265. .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  266. .addComponent(minus, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
  267. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  268. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  269. .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  270. .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  271. .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  272. .addComponent(multiplay, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
  273. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  274. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  275. .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  276. .addComponent(clear, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  277. .addComponent(decimal, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  278. .addComponent(divide, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
  279. .addGap(10, 10, 10)
  280. .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  281. .addComponent(posneg, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
  282. .addComponent(equals, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
  283. .addContainerGap(12, Short.MAX_VALUE))
  284. );
  285.  
  286. javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  287. getContentPane().setLayout(layout);
  288. layout.setHorizontalGroup(
  289. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  290. .addGroup(layout.createSequentialGroup()
  291. .addContainerGap()
  292. .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
  293. .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  294. );
  295. layout.setVerticalGroup(
  296. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  297. .addGroup(layout.createSequentialGroup()
  298. .addGap(25, 25, 25)
  299. .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  300. .addContainerGap(43, Short.MAX_VALUE))
  301. );
  302.  
  303. pack();
  304. }// </editor-fold>
  305.  
  306. private void clearActionPerformed(java.awt.event.ActionEvent evt) {
  307. display.setText("");
  308. decimalClick=0;
  309. }
  310.  
  311. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
  312. //display.getText(display.getText()+jButton1);
  313. display.setText(display.getText()+jButton1.getText());
  314. }
  315.  
  316. private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
  317. display.setText(display.getText()+jButton2.getText());
  318. }
  319.  
  320. private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
  321. display.setText(display.getText()+jButton3.getText());
  322. }
  323.  
  324. private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
  325. display.setText(display.getText()+jButton4.getText());
  326. }
  327.  
  328. private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
  329. display.setText(display.getText()+jButton5.getText());
  330. }
  331.  
  332. private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
  333. display.setText(display.getText()+jButton6.getText());
  334. }
  335.  
  336. private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {
  337. display.setText(display.getText()+jButton7.getText());
  338. }
  339.  
  340. private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {
  341. display.setText(display.getText()+jButton8.getText());
  342. }
  343.  
  344. private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {
  345. display.setText(display.getText()+jButton9.getText());
  346. }
  347.  
  348. private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {
  349. display.setText(display.getText()+jButton10.getText());
  350. }
  351.  
  352. private void decimalActionPerformed(java.awt.event.ActionEvent evt) {
  353. if(decimalClick==0){
  354. display.setText(display.getText()+decimal.getText());
  355. decimalClick=1;
  356. }
  357. }
  358.  
  359. private void posnegActionPerformed(java.awt.event.ActionEvent evt) {
  360. plusminus=(Double.parseDouble(String.valueOf(display.getText())));
  361. plusminus=plusminus*(-1);
  362. display.setText(String.valueOf(plusminus));
  363. }
  364.  
  365. private void plusActionPerformed(java.awt.event.ActionEvent evt) {
  366. firstDouble=(Double.parseDouble(String.valueOf(display.getText())));
  367. display.setText("");
  368. plusClick=1;
  369. decimalClick=0;
  370. }
  371.  
  372. private void minusActionPerformed(java.awt.event.ActionEvent evt) {
  373. firstDouble=(Double.parseDouble(String.valueOf(display.getText())));
  374. display.setText("");
  375. minusClick=1;
  376. decimalClick=0;
  377. }
  378.  
  379. private void multiplayActionPerformed(java.awt.event.ActionEvent evt) {
  380. firstDouble=(Double.parseDouble(String.valueOf(display.getText())));
  381. display.setText("");
  382. multiplyClick=1;
  383. decimalClick=0;
  384. }
  385.  
  386. private void divideActionPerformed(java.awt.event.ActionEvent evt) {
  387. firstDouble=(Double.parseDouble(String.valueOf(display.getText())));
  388. display.setText("");
  389. divideClick=1;
  390. decimalClick=0;
  391. }
  392.  
  393. private void equalsActionPerformed(java.awt.event.ActionEvent evt) {
  394. secondDouble=(Double.parseDouble(String.valueOf(display.getText())));
  395.  
  396. if(plusClick>0){
  397. totalDouble=firstDouble+secondDouble;
  398. display.setText((String.valueOf(totalDouble)));
  399. firstDouble=0;
  400. secondDouble=0;
  401. plusClick=0;
  402. }
  403. if(minusClick>0){
  404. totalDouble=firstDouble-secondDouble;
  405. display.setText((String.valueOf(totalDouble)));
  406. firstDouble=0;
  407. secondDouble=0;
  408. minusClick=0;
  409. }
  410. if(multiplyClick>0){
  411. totalDouble=firstDouble*secondDouble;
  412. display.setText((String.valueOf(totalDouble)));
  413. firstDouble=0;
  414. secondDouble=0;
  415. multiplyClick=0;
  416. }
  417. if(divideClick>0){
  418. totalDouble=firstDouble/secondDouble;
  419. display.setText((String.valueOf(totalDouble)));
  420. firstDouble=0;
  421. secondDouble=0;
  422. divideClick=0;
  423. }
  424. }
  425. /**
  426. * @param args the command line arguments
  427. */
  428. public static void main(String args[]) {
  429. java.awt.EventQueue.invokeLater(new Runnable() {
  430. public void run() {
  431. new Calculator().setVisible(true);
  432. }
  433. });
  434. }
  435.  
  436. // Variables declaration - do not modify
  437. private javax.swing.JButton clear;
  438. private javax.swing.JButton decimal;
  439. private javax.swing.JTextField display;
  440. private javax.swing.JButton divide;
  441. private javax.swing.JButton equals;
  442. private javax.swing.JButton jButton1;
  443. private javax.swing.JButton jButton10;
  444. private javax.swing.JButton jButton2;
  445. private javax.swing.JButton jButton3;
  446. private javax.swing.JButton jButton4;
  447. private javax.swing.JButton jButton5;
  448. private javax.swing.JButton jButton6;
  449. private javax.swing.JButton jButton7;
  450. private javax.swing.JButton jButton8;
  451. private javax.swing.JButton jButton9;
  452. private javax.swing.JPanel jPanel1;
  453. private javax.swing.JButton minus;
  454. private javax.swing.JButton multiplay;
  455. private javax.swing.JButton plus;
  456. private javax.swing.JButton posneg;
  457. // End of variables declaration
  458.  
  459. }
Add Comment
Please, Sign In to add comment