Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can anyone help me with this ?
If a component uses enableEvent() to handle a certain event mask, it may or may not use an Adapter as a listener for this event. True Or False

public class TestFrame extends Frame {
public TestFrame(String title) {

public void processWindowEvent(WindowEvent we) {
System.out.println("Window event processed");
1. The window listener that has been addded to the TestFrame will be called on every window Object.
2. This code will compile & run if a window listener is added to an instance of TestFrame.
3. An exception is thrown if a window listener is added to TestFrame.
4. The window Listener that has been added to the TestFrame will never been called
5. This code will not compile if a window listenr is added to the TestFrame.
Can anyone explain ......why use enableEvents() instead of implementing the appropriate liseners...... ?
Thx in Advance
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic