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

Answers were Sorted based on User's Feedback



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

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

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

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

More Swing Interview Questions

What is an event and what are the models available for event handling?

1 Answers  


What is the difference between AWT & Swing?

21 Answers   BeBo Technologies, Deshaw, TCS,


what do u mean by GUI framework

1 Answers  


What are swing components in java?

1 Answers  


What is the difference between swing and applet?

1 Answers  


What are swings?

1 Answers  


can we create a object in static block class A { static { A a=new A(); } }

7 Answers   Cap Gemini,


What is pane in swing?

1 Answers  


Why does JComponent have add() and remove() methods but Component does not?

1 Answers  


What is the base class for all swing components?

1 Answers  


What is swing control in java?

1 Answers  


What is actionlistener in java swing?

1 Answers  


Categories