Skip to content

Commit eb6a2fd

Browse files
authored
Add files via upload
Signed-off-by: kalyani chaudhari <138003080+misskalyani@users.noreply.github.com>
1 parent 4ea0666 commit eb6a2fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2207
-0
lines changed

Applet/Addition.class

1.34 KB
Binary file not shown.

Applet/Addition.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<body>
3+
<applet code="Addition.class" width="500" height="400">
4+
</applet>
5+
</body>
6+
</html>

Applet/Addition.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import java.applet.*;
2+
import java.awt.*;
3+
import java.awt.event.*;
4+
5+
public class Addition extends Applet implements ActionListener
6+
{
7+
Label l1,l2,l3;
8+
TextField t1,t2,t3;
9+
Button b1;
10+
public void init()
11+
{
12+
l1=new Label("Enter First No");
13+
l2=new Label("Enter Second No");
14+
l3=new Label("Display Result");
15+
t1=new TextField(10);
16+
t2=new TextField(10);
17+
t3=new TextField(10);
18+
b1=new Button("ADD");
19+
add(l1);add(t1);add(l2);add(t2);add(l3);add(t3);add(b1);
20+
b1.addActionListener(this);
21+
}
22+
public void actionPerformed(ActionEvent ae)
23+
{
24+
if(ae.getSource()==b1)
25+
{
26+
int a=Integer.parseInt(t1.getText());
27+
int b=Integer.parseInt(t1.getText());
28+
int c=a+b;
29+
}
30+
}
31+
}

Applet/Gdemo.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import java.awt.*;
2+
import java.applet.*;
3+
public class Gdemo extends Applet
4+
{
5+
public void paint(Graphics g)
6+
{
7+
g.drawString("Welcome Kalyani...!",150,10);
8+
9+
10+
g.drawLine(10,20,300,500);
11+
g.drawRect(100,50,100,300);
12+
g.fillRect(250,50,100,300);
13+
g.drawRoundRect(400,50,100,300,50,50);
14+
g.drawOval(100,400,100,100);
15+
g.setColor(Color.cycan);
16+
g.fillArc(300,300,100,100,200,200);
17+
g.setColor(Color.red);
18+
int a={100,550,300,600,50};
19+
int b={100,150,200,300,500};
20+
g.drawPolygon(a,b,5);
21+
}
22+
}

Applet/Graphics.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<body bgcolor="red" >
3+
<applet code="Graphics.class" width="500" height="400">
4+
</applet>
5+
</body>
6+
</html>

Applet/Graphics.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
import java.applet;
3+
import java.awt.*;
4+
public class Graphics extends Applet
5+
{
6+
public void paint(Graphics g)
7+
{
8+
Font f1=new Font("Arial",Font.BOLD,25);
9+
g.setFont(f1);
10+
g.drawString("Welcome Kalyani",100,100);
11+
g.drawRect(100,100,200,50);//x y width height
12+
g.drawOval(100,200,100,150);//x y w h
13+
g.drawLine(100,200,300,300);//x1 y1 x2 y2
14+
g.setColor(Color.red);
15+
g.fillOval(300,200,100,100);
16+
g.setColor(Color.pink);
17+
g.fillRect(100,300,200,50);
18+
g.drawArc(100,100,200,200,90,360);
19+
}
20+
}

Applet/Jtable.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import java.awt.*;
2+
import javax.swing.*;
3+
class table extends JFrame
4+
{
5+
JTable tbl;
6+
table()
7+
{
8+
setVisible(true);
9+
setSize(500,500);
10+
setLayout(new FlowLayout());
11+
String head[]={"ENO","NAME","SALARY"};
12+
String data[][]={{"101","sai","60000"},
13+
{"102","ram","78000"},
14+
{"103","om","67000"}};
15+
tbl=new JTable(data , head);
16+
// add(tbl);
17+
JScrollPane js=new JScrollPane(tbl);
18+
add(js);
19+
}
20+
public static void main(String ar[])
21+
{
22+
new table();
23+
}
24+
}

Applet/car.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<body>
3+
<applet code="car" width="500" height="500">
4+
</aplet>
5+
</body>
6+
</html>

Applet/car.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import java.awt.event.*;
2+
import java.awt.*;
3+
import java.applet.*;
4+
public class car extends Applet implements ActionListener
5+
{
6+
int i;
7+
Button b1,b2;
8+
public void init()
9+
{
10+
b1= new Button("next");
11+
b2=new Button("stop");
12+
setLayout(new FlowLayout());
13+
add(b1);
14+
add(b2);
15+
16+
}
17+
public void paint(Graphics g)
18+
{
19+
g.drawRect(100+i,100,100,50);
20+
g.fillOval(120+i,150,30,30);
21+
g.fillOval(150+i,150,30,30);
22+
}
23+
public void actionPerformed(ActionEvent ae)
24+
{
25+
if(ae.getSource()==b1)
26+
{
27+
i=i+30;
28+
repaint();
29+
}
30+
if(ae.getSource()==b2)
31+
{
32+
stop();
33+
}
34+
}
35+
36+
}

Applet/color.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<body>
3+
<applet code ="color.class" width="500" height="500">
4+
</applet>
5+
</body>
6+
</html>

0 commit comments

Comments
 (0)