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

What is an immutable class?

0 Answers  


Why java is considered as platform independent?

0 Answers  


If we don’t want some of the fields not to serialize how to do that?

0 Answers  


what is real-time example of runtime polymorphism and compile time polymorphism

4 Answers   SLK Group,


How does predicate work in java?

0 Answers  






Does .length start 0 java?

0 Answers  


explain System.out.println

107 Answers   Calpine Technologies, Care, Cognizant, CTS, IBM, IBS, LibSys, Oracle, Spiro Solutions, TCS,


Can i have abstract class with no abstract methods?

22 Answers   CTS,


Are registers volatile?

0 Answers  


What does the @override annotation do?

0 Answers  


Suppose there is a System A which gives some output. This output is used as input by system B. The rate at which System A produces is faster than the rate at which system B consumes it. How can you improve this?

1 Answers   RBS,


What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?

0 Answers  


Categories