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

Answer Posted / nilam

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the components of swing?

522


What is jfc? What are the features of jfc?

613


Why are swings considered lightweight?

539


What are swing components in java?

473


What is swing gui in java?

556






How to create a swing gui in java?

520


What is content pane in swing?

514


What are the containers available in swing?

518


What is the relationship between clipping and repainting?

658


Why swing is used in java?

523


What is pane in swing?

527


Can a class be it?s own event handler? Explain how to implement this?

535


What are swings?

511


What are the features of swing in java?

509


Which is better swing or awt?

528