Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  StudentInformation.java
Language: JAVA
Code:
import java.applet.Applet;  
import java.awt.*;  
/*<applet code="StudentInformation" width=500 height=500>
<param name=name value="yaswanth">
<param name=rollno value="4187">
<param name=address value="Guntur">
</applet>
*/
public class StudentInformation extends Applet{  
String name,x;
int rollno,y;
String address,z;
public void init()
{
     setBackground(Color.yellow);
}
public void paint(Graphics g)
{
if((getParameter("name"))==null||(Integer.parseInt(getParameter("rollno")))==0||(getParameter("address"))==null)
     g.drawString("Input not  found please give the input...!",50,50);
else
{{
x=getParameter("name");
g.drawString("Name="+x,50, 50);
y=Integer.parseInt(getParameter("rollno"));
g.drawString("rollno="+y,100, 100);  
z=getParameter("address");
g.drawString("address="+z,200,200);
}  
}  
}
}
Comments: