0% found this document useful (0 votes)
2 views2 pages

Exp 1 Java

The document contains two Java applet examples. The first example demonstrates the use of checkboxes for language selection and gender selection. The second example illustrates the creation of a form with labels, a text field, a text area, and a submit button.

Uploaded by

Samarth Mhetre
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Exp 1 Java

The document contains two Java applet examples. The first example demonstrates the use of checkboxes for language selection and gender selection. The second example illustrates the creation of a form with labels, a text field, a text area, and a submit button.

Uploaded by

Samarth Mhetre
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Exp1_ex1_10

import [Link].*;

import [Link].*;

public class exp1_ex1_10 extends Applet

public void init()

Checkbox ck1 = new Checkbox("marathi");

add(ck1);

Checkbox ck2 = new Checkbox("hindi");

add(ck2);

CheckboxGroup ckg=new CheckboxGroup();

Checkbox ck3 = new Checkbox("male",ckg,true);

add(ck3);

Checkbox ck4= new Checkbox("female",ckg,false);

add(ck4);

/* <applet code= "exp1_ex1_10" height=300 width=300></applet>*/

Output:
Exp1_ex2_10

import [Link].*;

import [Link].*;

public class exp1_ex2_10 extends Applet

public void init()

Label l1=new Label("Name");

add(l1);

TextField t1=new TextField(10);

add(t1);

Label l2=new Label("Address");

add(l2);

TextArea ta=new TextArea(5,10);

add(ta);

Button b1=new Button("Submit");

add(b1);

/*<applet code="exp1_ex2_10" width=200 height=200></applet>*/

Output:

You might also like