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 are tab pans?

3 Answers  


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

0 Answers  


What are the benefits if Swing over AWT?

0 Answers  


Which types of components are used in designing swing based gui?

0 Answers  


What is swing control in java?

0 Answers  






I want to change the appearance of Frame in Runtime, what class can be used to do this?

2 Answers   TCS, Wipro,


What is an event handler in swing?

0 Answers  


What is the function of lightweight components used in swing?

0 Answers  


What is swing framework in java?

0 Answers  


Is swing an api?

0 Answers  


What is the difference between AWT & Swing?

21 Answers   BeBo Technologies, Deshaw, TCS,


how to give transparency to JComboBox,JList and JTable

5 Answers   Ness Technologies,


Categories