Design a Java Netbeans 6.5.1 GUI application to find the maximum number between the two numbers.

Q8. Design a Java Netbeans 6.5.1 GUI application to find the maximum number between the two numbers.

Sol:

Create a GUI application as per following screenshot.

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

 

int x,y;

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

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

if(x>y)

lblmax.setText(x+””);

else

lblmax.setText(y+””);

}

OUTPUT:

Design Java Netbeans 6.5.1 GUI application to find out that entered number is EVEN or ODD.

Q7. Design Java Netbeans 6.5.1 GUI application to find out that entered number is EVEN or ODD.

Sol:

Create a GUI application as per following screenshot.

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

int num;

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

if(num%2==0)

lblmsg.setText(“Number is EVEN.”); Read More …

Java NetBeans GUI application to calculate salary of employee.

Q6. Design a Java NetBeans GUI application to calculate salary of employee.

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 sal,da,ta,hra,cca;

sal=Double.parseDouble(txtsal.getText()); Read More …

Java Netbeans Application To Find Out Total, Percentage Of Any Three Subjects.

Q5. Design a GUI application to find out Total, Percentage of any three subjects (Subject marks not more than 100).

Sol:

Create a GUI application as per following screenshot.

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

Display Information of Student in I-Card Format in Java Netbeans 6.5.1.

Q4. Design a Java Netbeans 6.5.1 GUI application that asks for some information about a student and display it in I-card format.

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=txtTitle.getText();    //text of txtTitle stored in t1.

String t2=txtName.getText();    //text of txtTitle stored in t2.

String t3=txtLname.getText();    //text of txtTitle stored in t3.

String t4=txtClass.getText();   //text of txtTitle stored in t4.

String t5=txtSec.getText();    //text of txtTitle stored in t5.

 

repArea.append(“Student Details:” + “\n”);    //text will be added to textarea

repArea.append(“Name:” + t1 + ” ” + t2 + ” ” + t3 + “\n”);

repArea.append(“Class:” + t4 + ” ” + t5);

 

Output of the above program will be: