Hi Readers,
In this article I want to tell you how to make a assignment file by taking an example of one Java Program.
In this article I want to tell you how to make a assignment file by taking an example of one Java Program.
Ans 1. DESIGN VIEW
OBJECT NAMING CONVENTION TABLE
Object Name
|
Object Type
|
Description
|
jTextField1
|
Text Box Control
|
Used to take first number at
run time.
|
jTextField2
|
Text Box Control
|
Used to take second number at
run time.
|
jLabel1
|
Label Control
|
Used to display caption in front
of first number text box.
|
jLabel2
|
Label Control
|
Used to display caption in front
of second number text box.
|
jButton1
|
Command Button
|
Used to find greater among
given numbers.
|
jButton2
|
Command Button
|
Used to Clear both text boxes
|
Coding of the Problem
Coding of Clear command button
Event is jButton1ActionPerformed
jTextField1.setText(" ");
jTextField2.setText(" ");
Coding of Click me command button
Event is jButton1ActionPerformed
int a,b;
a=Integer.parseInt(jTextField1.getText());
b=Integer.parseInt(jTextField2.getText());
if(a>b)
{
JOptionPane.showMessageDialog(null,
"First number is greater ");
}
else
{
JOptionPane.showMessageDialog(null,"Second
number is greater");
}
Run View
Nios Center
ReplyDelete12th Admission CBSE patrachar
12th admission CBSE Patrachar
12th CBSE Private Form
NIOS Fees
CBSE improvement exam 2020 Class 12th
CBSE Private Form 10th 12th Class Last Date 2019-20
NIOS Form
NIOS 10th Admission Form
CBSE Patrachar admission form Class 10
nios admission12th class last date
CBSE Patrachar Vidyalaya Dwarka
ReplyDeleteCBSE Patrachar Vidyalaya Uttam Nagar
CBSE Patrachar Vidyalaya Nawada
CBSE Patrachar Vidyalaya Rajouri Garden
CBSE Patrachar Vidyalaya Tagore Garden