doubt in java...................

Posted by Mohit007kumar00 under JavaScript on 7/27/2010 | Views : 1270 | Status : [Member] | Replies : 1
check this i am not able to set my layout where i do mistake???
.
import java.applet.*;
import java.awt.*;
public class mohit extends Applet
{
Label yoname,country,state,city,email,kabout;
TextField yname,ycountry,ystate,ycity,yemail;
TextArea about;
Button submit;
public void init()
{
yoname=new Label("Your name");
country=new Label("Country");
state=new Label("State");
city=new Label("City");
email=new Label("Email");
kabout=new Label("Message");
yname=new TextField(4);
ycountry=new TextField(4);
ystate=new TextField(4);
ycity=new TextField(4);
yemail=new TextField(4);
submit=new Button("Submit");
about=new TextArea("Type your text here ");
Font f=new Font("Arial",Font.BOLD+Font.ITALIC,20);
yoname.setFont(f);
country.setFont(f);
state.setFont(f);
city.setFont(f);
email.setFont(f);
kabout.setFont(f);
setLayout(new GridLayout(6,2,8,8));
add(yoname);
add(country);
add(state);
add(city);
add(email);
add(kabout);
add(yname);
add(ycountry);
add(ystate);
add(ycity);
add(yemail);
add(about);
add(submit);
}
}

Send me the correct coading...

mohit cboy hack the world


Responses

Posted by: Vuyiswamb on: 7/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
It has been long since touched java, i am not sure if anyone can help you with Java in this forum

We are basically a Microsoft forum. but i will try to remember what i did in jdk 1.2

Do you receive any Error and which line are you getting the error. I used to use a panel to add the controls.Tell me your error and we will take it from there.

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Mohit007kumar00, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response