Programlama | Programlama Dilleri | C Programlama Dili |C++

Hata
  • XML Parsing Error at 1:82. Error 9: Invalid character
Anasayfa Programlama Java Java ?le Hesap Makinesi


Java ?le Hesap Makinesi

Java ile yaz?lm?? olan programda bir basit hesap makinesi yap?lm??t?r. Projede java ile hesap makinesi yap?lm??t?r, e?itli buglar (float say?lar iin) bulunmakla birlikte bu tarz bir proje iin olduka yararl? bir kaynak olacakt?r.
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package hesapmakinesi;
  6. /**
  7. *
  8. * @author YunusHavin
  9. */
  10. public class HesapMk extends javax.swing.JFrame {
  11. //de?i?kenler
  12. Double donusumm;
  13. Double ilkdeger;
  14. Double [] degerler;
  15. Double ikincideger;
  16. Double toplam;
  17. //t?klamalar? kontrol etmek iin
  18. int toplat?kla;
  19. int c?kart?kla;
  20. int bolt?kla;
  21. int carpt?kla;
  22. /**
  23. * Creates new form HesapMk
  24. */
  25. public HesapMk() {
  26. initComponents();
  27. }
  28. /**
  29. * This method is called from within the constructor to initialize the form.
  30. * WARNING: Do NOT modify this code. The content of this method is always
  31. * regenerated by the Form Editor.
  32. */
  33. @SuppressWarnings("unchecked")
  34. // <editor-fold defaultstate="collapsed" desc="Generated Code">
  35. private void initComponents() {
  36. Giris = new javax.swing.JTextField();
  37. jButton1 = new javax.swing.JButton();
  38. jButton2 = new javax.swing.JButton();
  39. jButton3 = new javax.swing.JButton();
  40. topla = new javax.swing.JButton();
  41. jButton5 = new javax.swing.JButton();
  42. jButton6 = new javax.swing.JButton();
  43. jButton7 = new javax.swing.JButton();
  44. c?kar = new javax.swing.JButton();
  45. jButton9 = new javax.swing.JButton();
  46. jButton10 = new javax.swing.JButton();
  47. jButton11 = new javax.swing.JButton();
  48. carp = new javax.swing.JButton();
  49. jButton13 = new javax.swing.JButton();
  50. Temizle = new javax.swing.JButton();
  51. nokta = new javax.swing.JButton();
  52. bol = new javax.swing.JButton();
  53. donusum = new javax.swing.JButton();
  54. e?ittir = new javax.swing.JButton();
  55. C?k = new javax.swing.JButton();
  56. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  57. Giris.setEditable(false);
  58. Giris.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  59. jButton1.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  60. jButton1.setText("1");
  61. jButton1.addActionListener(new java.awt.event.ActionListener() {
  62. public void actionPerformed(java.awt.event.ActionEvent evt) {
  63. jButton1ActionPerformed(evt);
  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. jButton3.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  74. jButton3.setText("3");
  75. jButton3.addActionListener(new java.awt.event.ActionListener() {
  76. public void actionPerformed(java.awt.event.ActionEvent evt) {
  77. jButton3ActionPerformed(evt);
  78. }
  79. });
  80. topla.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  81. topla.setText("+");
  82. topla.addActionListener(new java.awt.event.ActionListener() {
  83. public void actionPerformed(java.awt.event.ActionEvent evt) {
  84. toplaActionPerformed(evt);
  85. }
  86. });
  87. jButton5.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  88. jButton5.setText("4");
  89. jButton5.addActionListener(new java.awt.event.ActionListener() {
  90. public void actionPerformed(java.awt.event.ActionEvent evt) {
  91. jButton5ActionPerformed(evt);
  92. }
  93. });
  94. jButton6.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  95. jButton6.setText("5");
  96. jButton6.addActionListener(new java.awt.event.ActionListener() {
  97. public void actionPerformed(java.awt.event.ActionEvent evt) {
  98. jButton6ActionPerformed(evt);
  99. }
  100. });
  101. jButton7.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  102. jButton7.setText("6");
  103. jButton7.addActionListener(new java.awt.event.ActionListener() {
  104. public void actionPerformed(java.awt.event.ActionEvent evt) {
  105. jButton7ActionPerformed(evt);
  106. }
  107. });
  108. c?kar.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  109. c?kar.setText("-");
  110. c?kar.addActionListener(new java.awt.event.ActionListener() {
  111. public void actionPerformed(java.awt.event.ActionEvent evt) {
  112. c?karActionPerformed(evt);
  113. }
  114. });
  115. jButton9.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  116. jButton9.setText("7");
  117. jButton9.addActionListener(new java.awt.event.ActionListener() {
  118. public void actionPerformed(java.awt.event.ActionEvent evt) {
  119. jButton9ActionPerformed(evt);
  120. }
  121. });
  122. jButton10.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  123. jButton10.setText("8");
  124. jButton10.addActionListener(new java.awt.event.ActionListener() {
  125. public void actionPerformed(java.awt.event.ActionEvent evt) {
  126. jButton10ActionPerformed(evt);
  127. }
  128. });
  129. jButton11.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  130. jButton11.setText("9");
  131. jButton11.addActionListener(new java.awt.event.ActionListener() {
  132. public void actionPerformed(java.awt.event.ActionEvent evt) {
  133. jButton11ActionPerformed(evt);
  134. }
  135. });
  136. carp.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  137. carp.setText("*");
  138. carp.addActionListener(new java.awt.event.ActionListener() {
  139. public void actionPerformed(java.awt.event.ActionEvent evt) {
  140. carpActionPerformed(evt);
  141. }
  142. });
  143. jButton13.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  144. jButton13.setText("0");
  145. jButton13.addActionListener(new java.awt.event.ActionListener() {
  146. public void actionPerformed(java.awt.event.ActionEvent evt) {
  147. jButton13ActionPerformed(evt);
  148. }
  149. });
  150. Temizle.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  151. Temizle.setText("C");
  152. Temizle.addActionListener(new java.awt.event.ActionListener() {
  153. public void actionPerformed(java.awt.event.ActionEvent evt) {
  154. TemizleActionPerformed(evt);
  155. }
  156. });
  157. nokta.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  158. nokta.setText(".");
  159. nokta.addActionListener(new java.awt.event.ActionListener() {
  160. public void actionPerformed(java.awt.event.ActionEvent evt) {
  161. noktaActionPerformed(evt);
  162. }
  163. });
  164. bol.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  165. bol.setText("/");
  166. bol.addActionListener(new java.awt.event.ActionListener() {
  167. public void actionPerformed(java.awt.event.ActionEvent evt) {
  168. bolActionPerformed(evt);
  169. }
  170. });
  171. donusum.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  172. donusum.setText("+/-");
  173. donusum.addActionListener(new java.awt.event.ActionListener() {
  174. public void actionPerformed(java.awt.event.ActionEvent evt) {
  175. donusumActionPerformed(evt);
  176. }
  177. });
  178. e?ittir.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
  179. e?ittir.setText("=");
  180. e?ittir.addActionListener(new java.awt.event.ActionListener() {
  181. public void actionPerformed(java.awt.event.ActionEvent evt) {
  182. e?ittirActionPerformed(evt);
  183. }
  184. });
  185. C?k.setText("?k");
  186. C?k.addActionListener(new java.awt.event.ActionListener() {
  187. public void actionPerformed(java.awt.event.ActionEvent evt) {
  188. C?kActionPerformed(evt);
  189. }
  190. });
Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
Son Güncelleme ( Perşembe, 10 Ocak 2013 23:57 )  
404 Not Found

404

Not Found

The resource requested could not be found on this server!


Proudly powered by LiteSpeed Web Server

Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.