0% found this document useful (0 votes)
2 views

java pr 13.2

The document contains a Java applet code for a registration form with fields for name, address, birthday, gender, and job. It uses a FlowLayout to arrange the components and includes buttons for 'Register' and 'Exit'. An HTML structure is provided to embed the applet in a web page.

Uploaded by

santoshgupta5546
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

java pr 13.2

The document contains a Java applet code for a registration form with fields for name, address, birthday, gender, and job. It uses a FlowLayout to arrange the components and includes buttons for 'Register' and 'Exit'. An HTML structure is provided to embed the applet in a web page.

Uploaded by

santoshgupta5546
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical No 13.

1
Test.java file:

import java.awt.*;

public class Test extends


java.applet.Applet
{
public void init()
{
setLayout(new
FlowLayout(FlowLayout.LEFT));
add(new Label("Name :"));
add(new TextField(10));
add(new Label("Address :"));
add(new TextField(10));
add(new Label("Birthday :"));
add(new TextField(10));
add(new Label("Gender :"));
Choice gender=new Choice();
gender.addItem("man");
gender.addItem("woman");
Component add=add(gender);
add(new Label("Job :"));
CheckboxGroup job=new CheckboxGroup();
add(new Checkbox("student",job,false));
add(new Checkbox("Teacher",job,false));
add(new Button("Register"));
add(new Button("Exit"));
}
}
<html>
<head>
<title>Register</title>
</head>
<body>
<applet code="Test.class" width=230
height=300></applet>
</body>
</html>

You might also like