i want connect client to server,because i want to access database of sever and display information on gadget(i already make some gadget on Vista) using Applet in java,so how can i do this?Please Send me Applet Code for it.
code for applet
Collapse
X
-
Tags: None
-
import java.io.*;Originally posted by chetanpateli want connect client to server,because i want to access database of sever and display information on gadget(i already make some gadget on Vista) using Applet in java,so how can i do this?Please Send me Applet Code for it.
import java.applet.*;
import java.awt.*;
public class ap1 extends Applet
{
//Applet component declarations...
TextField t1,t2;
Label lab1;
Label lab2;
Button b1;
public void init()
{
//Intialization of components
t1=new TextField(8);
t2=new TextField(8);
lab1= new Label("first number");
lab2= new Label("Second number");
add(lab1);
add(t1);
add(lab2);
add(t2);
}
public void paint(Graphics g)
{
//things u want to disply in applet area
int x,y,s=0;
}
public Boolean action (Event e1,Object ob1)
{
repaint();
return true;
}
} -
1.) Use code tags when posting code.Originally posted by Navdipimport java.io.*;
import java.applet.*;
import java.awt.*;
public class ap1 extends Applet
{
//Applet component declarations...
TextField t1,t2;
Label lab1;
Label lab2;
Button b1;
public void init()
{
//Intialization of components
t1=new TextField(8);
t2=new TextField(8);
lab1= new Label("first number");
lab2= new Label("Second number");
add(lab1);
add(t1);
add(lab2);
add(t2);
}
public void paint(Graphics g)
{
//things u want to disply in applet area
int x,y,s=0;
}
public Boolean action (Event e1,Object ob1)
{
repaint();
return true;
}
}
2.) Do not attempt to spoonfeed. It is against site rules.Comment
Comment