learn Java Programming With These Programs.

Learn Java With These 2 Java Programs.

Registration Form (java program):-

Java is everywhere in the coding world. It is the vast coding language of the coding language family and is also taught to the students studying in class 10 and 12 in India as the part of their Informatic Practices curriculum. In this post, you will see how to make an intermediate, graduation and post graduation registration form which can be helpful for IP students to learn java for class 12 projects and for others who want to make programs like this. This program is helpful for office computers, college computers, library computers, and many other organizational computers. This program can be added in the IP subject external file that students are asked to make. In this post, you will have the coding done at the back end and the interactive user interface as well. If you wanna make and learn java coding of discount and marks calculator then visit the down given link.

Read more:- Java program to design discount and marks calculator

1.coding for registration form program:-

 

import javax.swing.JOptionPane; // at the top of the program

String s=text1.getText();
if(rb1.isSelected())
{
JOptionPane.showMessageDialog(this,”MR” +” “+ s +” YOU ARE REGISTERED “);

}
else
{
JOptionPane.showMessageDialog(this,”MRs.” +” “+ s +” YOU ARE REGISTERED “);
}
if(chk2.isSelected())
{
chk1.setSelected(true);
}
else if(chk3.isSelected())
{
chk2.setSelected(true);
chk1.setSelected(true);
}
}

private void chk1ActionPerformed(java.awt.event.ActionEvent evt) {

}

private void button2ActionPerformed(java.awt.event.ActionEvent evt) {
text1.setText(“”);
chk1.setSelected(false);
chk2.setSelected(false);
chk3.setSelected(false);
rb1.setSelected(false);

 

Java form of registration form program:

2. Shoe Factory program coding:-

 

private void button1ActionPerformed(java.awt.event.ActionEvent evt) {
int shoe=Integer.parseInt(text1.getText());

int amt=0,amt1=0,amt3=0,sum;
if(chk1.isSelected())
{
amt=shoe*1500;
text4.setText(“”+amt);
text7.setText(“”+amt);
}

int sandal=Integer.parseInt(text1.getText());
if(chk2.isSelected())
{
amt1=sandal*1000;
text5.setText(“”+amt1);
text7.setText(“”+amt1);
}
int slippers=Integer.parseInt(text3.getText());
if(chk2.isSelected())
{
amt3=slippers*500;
text6.setText(“”+amt3);
text7.setText(“”+amt3);
}
sum=amt+amt1+amt3;
text7.setText(“”+sum);

 

Java form of the shoe factory program:

 

learn java
learn java

Learn Java and practice it with these small programs which can be very helpful for students .you can also directly copy the code and paste it on your IDE platform .so here were the 2 simple Java IDE programs anybody can make on their IDE platform. Hope you guys like these programs and stay tuned because we keep bringing such updated JAVA IDE  programs to you on regular basis and we will continue to do so.

Be the first to comment

Leave a Reply

Your email address will not be published.


*