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 an on stage swing?

549


How to reload a jframe in java swing?

550


What is the difference between swing and awt?

540


Which method is used for setting security in applets?

597


What is difference between swing and awt?

491






What's java swing?

571


What are the swing components?

504


What is the use of jcomponent class in swing?

573


What is swing framework in java?

557


What method is used to specify a container's layout?

520


Which swing methods are thread-safe?

644


What is awt and swing?

547


How to create a swing gui in java?

530


What is a component in swing?

508


Why are swing components called lightweight components?

481