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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many functional interfaces does java 8 have?

604


If you are given the name of the function at run time how will you invoke the function?

678


What is main function purpose?

520


Does google use java?

530


Why is java called the platform independent programming language?

570






How do you override a method in java?

535


How can you set an applet’s height and width as a percentage?

511


What is an example of a keyword?

539


What are the important methods of java exception class?

569


What is meant by method?

575


What is a stack class in java ?

609


Difference between == and .equals() ?

570


Which category the java thread do fall in?

567


What is static method with example?

614


What is the difference between final, finally and finalize()?

541