File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes EventHandler class and enabling other Component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "EventHandler class and enabling other Component" Watch "EventHandler class and enabling other Component" New topic
Author

EventHandler class and enabling other Component

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Ok, so using the EventHandler class I can enable or disable another JComponent when an Action occurs on some other JComponent using the create method, and that is great. Now my question is, is there a way to enable or disable based on specific values from the JComponent where it Action is fired.

Now I can have the EventHandler call a method on the Listener, and could use this, but do you think this method it calls should be within the view class, or should it still be outside the view class in its own class.

Well, just thinking out loud, how will the outside class have a reference to the other JComponent that needs to be disabled or enabled.

I think you can create an EventHandler through the constructor, and then call invoke, rather than the preferred way of calling the create static method on EventHandler.

Ideas, thoughts?

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EventHandler class and enabling other Component
 
Similar Threads
JButtons should start Threads whit synchronized handling of a JTable model
Controller servlet better practice
Forwarding data changes in MVC
Data Server GUI
GUI components