Explain the below Statement
if(ae.getSource()==b1)

Answer Posted / nilam

getSource() method will return the component which is triggered, so basically this statement means if condition will be true if triggered component is b1(button b1).

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is awt and swing in java?

493


What is sling swing?

530


What is swing delegation event model in java?

547


What is the design pattern that java uses for all swing components ?

501


How does accessibility works in swings?

545






What is the use of java swing?

520


What is jpanel in java swing with example?

499


Is swing part of core java?

521


How to reload a jframe in java swing?

542


What is container in java swing?

526


What is the class in swing to change the appearance of the frame in runtime?

556


What are heavy weight components ?

614


What are the containers available in swing?

518


In what context should the value of swing components be updated directly?

508


What is swing api?

520