net beansprojects

12

Upload: pratik8897

Post on 14-Jan-2015

304 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Net beansprojects
Page 2: Net beansprojects
Page 3: Net beansprojects
Page 4: Net beansprojects

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("");

Page 5: Net beansprojects
Page 6: Net beansprojects

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));

Page 7: Net beansprojects

• 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));

Page 8: Net beansprojects

• 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));

Page 9: Net beansprojects

• 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));

Page 10: Net beansprojects
Page 11: Net beansprojects
Page 12: Net beansprojects

ALL THE BEST EVERYONE