Count Lowest to Highest.

Q18. Design a Java Netbeans 6.5.1 GUI application having interface as shown below :

 The loop for the frame should print numbers from lowest to highest on the basis of given two numbers, upon clicking at “Count” button.

Sol:

Type the following code by double clicking jButton2, button, below the line that says, ‘// TODO add your handling code here’

 

 

int num1,num2;

num1=Integer.parseInt(jTextField1.getText()); Read More …

Simple Interest Programme.

Q16. Design Java Netbeans 6.5.1 an application that accepts principal amount, rate of interest and time from the user. Then it computes the simple interest and displays it.

Sol:

Create a GUI application as per following screenshot.

Type the following code by double clicking Button1, button, below the line that says, ‘// TODO add your handling code here’

jTextField1.setText(“”);

jTextField2.setText(“”);

jTextField3.setText(“”);

jTextField4.setText(“”);

jTextField5.setText(“”);

}

Type the following code by double clicking Button2, button, below the line that says, ‘// TODO add your handling code here’

double prin,rate,time,sim,total;

prin=Double.parseDouble(jTextField1.getText());

rate=Double.parseDouble(jTextField2.getText());

time=Double.parseDouble(jTextField3.getText());

sim=(prin*rate*time)/100;

jTextField4.setText(sim+””);

total=prin+sim;

jTextField5.setText(total+””);

}

Type the following code by double clicking Button3, button, below the line that says, ‘// TODO add your handling code here’

System.exit(0);

}

Output:

Students Result in JAVA NETBEANS IDE 6.5.1

Q15. Design an application in JAVA NETBEANS IDE 6.5.1 to prepare students result on the basis of marks entered.

Sol:

Create a GUI application as per following screenshot.

 

Type the following code by double clicking  jButton1 , button, below the line that says, ‘// TODO add your handling code here’

jTextField1.setText(“”);

jTextField2.setText(“”);

jTextField3.setText(“”);

jTextField4.setText(“”);

jTextField5.setText(“”);

jTextField6.setText(“”);

jTextField7.setText(“”); Read More …

Boiling Point Of Water(if…else)

Q14. Program to obtain boiling point of water from user and report whether the user has entered the correct answer or not. Make use of if…else statement.

(Hint. Boiling point of water is 100C.)

Sol:

Create a GUI application as per following screenshot.

 

Type the following code by double clicking BtnAdd, button, below the line that says, ‘// TODO add your handling code here’

String t1=txt1.getText();

double temp=Double.parseDouble(t1);

if(temp==100)

lbl1.setText(“You are right. It is 100C”);

else

lbl1.setText(“No. It is 100C”);

}

 

OUTPUT:

Java Netbeans 6.5.1 Program That Print Largest Of The Three.

Q13. Design a Java Netbeans 6.5.1 program that accept three integer and print the largest of the three. Make  the use of only if statement.

Sol:

Create a GUI application as per following screenshot.

Type the following code by double clicking BtnLar, button, below the line that says, ‘// TODO add your handling code here’

int x,y,z;

x=Integer.parseInt(txt1.getText());

y=Integer.parseInt(txt2.getText());

z=Integer.parseInt(txt3.getText()); Read More …

Calculate Mobile Bill Amount.

Q12. Design a Java Netbeans 6.5.1 GUI application to calculate mobile bill amount?

Criteria Table:

Calls Call Rate
1-100 1 Rs per call
101-200 1.20 Rs per call
201-300 1.50 Rs per call
Above 300 1.80 Rs per call

 Sol:

Create a GUI application as per following screenshot.

Type the following code by double clicking BtnCal, button, below the line that says, ‘// TODO add your handling code here’ 

double amt;

int call;

call=Integer.parseInt(txt1.getText());

if(call>=1&& call<=100)

amt=call*1;

else if(call<=200)

amt=100+(call-100)*1.20;

else if(call<=300)

amt=100+120+(call-200)*1.50;

else

amt=100+120+150+(call-300)*1.80;

lbl1.setText(amt+””);

}

OUTPUT:

Java Netbeans GUI application that demonstrate arithmetic operators.

Q7. Design a Java Netbeans GUI application that gives demonstration of all arithmetic operators.

Sol:

Create a GUI application as per following screenshot.

Screenshot

Double click BtnAdd button boundary and type the following code, below the line that says, ‘// TODO add your handling code here’

 

int n1,n2,a; Read More …

Design a Java Netbeans GUI applications to calculate bonus and netsalary with if condition

Q11. Design a Java Netbeans GUI applications to calculate bonus and netsalary with if condition.

Criteria Table

Salary Bonus
1-5000 15% of Bonus
5001-8000 25% of Bonus
8001-10000 30% of Bonus
Above 10000 35% of Bonus

Create a GUI application as per following screenshot.

Type the following code by double clicking BtnCal, button, below the line that says, ‘// TODO add your handling code here’

int sal;

double bon,nsal; Read More …

Java Netbeans GUI application to find out the division of student.

Q9. Design a Java Netbeans GUI application to find out the division of student.

Criteria Table

Percentage Division
60-100 First Division
48-60 Second Division
36-48 Third Division
1-36 Fail

 Sol:

Create a GUI application as per following screenshot.

 

 

 

Type the following code by double clicking BtnDiv, button, below the line that says, ‘// TODO add your handling code here’ Read More …