File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes EnableEvents Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "EnableEvents" Watch "EnableEvents" New topic
Author

EnableEvents

Doit
Ranch Hand

Joined: Aug 03, 2000
Posts: 169
What is the output?
I have selected MYFrame will never receive notifications.
- Thanks
1.public class MyFrame extends Frame {
2. public MyFrame(String title) {
3. super(title);
4. enableEvents(AWTEvent.WINDOW_EVENT_MASK);
5. }
6.
7. public void processWindowEvent(WindowEvent we) {
8. System.out.println("Processing a window event.");
9. }
10. }
Sunita Vontel
Ranch Hand

Joined: Aug 28, 2000
Posts: 72
I agree with you
hanmeng
Greenhorn

Joined: Aug 16, 2000
Posts: 26
Hi, Doit,
I compile the file, it's passed. but it does not run--exception in thread "main" java.lang.NoSuchMethodError: main
==================================
import java.awt.*;
import java.awt.event.*;

public class MyFrame extends Frame {
public MyFrame(String title) {
super(title);
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
}
public void processWindowEvent(WindowEvent we) {
System.out.println("Processing a window event.");
}
}
 
IntelliJ Java IDE
 
subject: EnableEvents
 
Threads others viewed
EventHandling problem.
jFrame Closing Solution
Change Icon on JInternalFrame
a qn from RHE..
Displaying an Image on a thick-client
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture