How can i add a button in applet in java ???

Answers were Sorted based on User's Feedback



How can i add a button in applet in java ???..

Answer / s.krishna veni

buttons should be declared..
coding to add a button :
Button b1;
b1=new Button("ok");
add(b1);

and after declaring the button..,we should add it to the
applet window..
so that a button is added at run time..

Is This Answer Correct ?    3 Yes 0 No

How can i add a button in applet in java ???..

Answer / giridhar gangapatnam

Button b1=new Button("OK");
add(b1);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How use .contains in java?

0 Answers  


why HashTable not allow null key and value

2 Answers   Crimson Logic,


What is the difference between static and non-static variables?

6 Answers  


Can you access non static variable in static context?

0 Answers  


If I will write String s=new String("XYZ"); String s1=new String("XYZ"); if(s.equals(s1)){ sop("True"); } else{ sop("False"); } This program will give me "True". But When I am creating my own class suppose class Employee{ public Employee(String name); } Employee e= new Employee("XYZ"); Employee e1 = neew Employee("XYZ"); if(e.equals(e1)){ sop("True"); } else{ sop("False"); } Then it will give the output as "False". Can I know what is happening internally?

5 Answers  






Discuss about garbage collector in Java.

0 Answers   Agilent, Integreon, ZS Associates,


What is an object’s lock and which object’s have locks?

0 Answers  


we r taking <load-on-startup>0</load-on-startup> <load-on-startup>1</load-on-startup> in deployment descripter for loading servlets like serv1 N serv2? so 'll it take serv1 or serv2

2 Answers   CSC,


What is the difference between integer parseint and integer valueof?

0 Answers  


What is qualitative variable?

0 Answers  


What are new features introduced with java 8 ?

0 Answers  


What are packages and name a few?

4 Answers  


Categories