Net beansprojects

507 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
507
On SlideShare
0
From Embeds
0
Number of Embeds
129
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Net beansprojects

  1. 1. Coding• Double click the exit button and type the following code as it is: System.exit(0);• Then double click the clear button and type the following code in it:• jTextField1.setText("");• jTextField2.setText("");• jTextField3.setText("");
  2. 2. Coding• Double click the add button and type the following coding in it:• Float num1, num2, result;• num1= Float.parseFloat(jTextField1.getText());• num2= Float.parseFloat(jTextField2.getText());• result= num1 + num2;• jTextField3.setText(String.valueOf(result));
  3. 3. • Double click the subtract button and type the following coding in it:• Float num1, num2, result;• num1= Float.parseFloat(jTextField1.getText());• num2= Float.parseFloat(jTextField2.getText());• result= num1 - num2;• jTextField3.setText(String.valueOf(result));
  4. 4. • Double click the multiply button and type the following coding in it:• Float num1, num2, result;• num1= Float.parseFloat(jTextField1.getText());• num2= Float.parseFloat(jTextField2.getText());• result= num1 * num2;• jTextField3.setText(String.valueOf(result));
  5. 5. • Double click the divide button and type the following coding in it:• Float num1, num2, result;• num1= Float.parseFloat(jTextField1.getText());• num2= Float.parseFloat(jTextField2.getText());• result= num1 / num2;• jTextField3.setText(String.valueOf(result));

×