Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Swing / AWT / SWT and the fly likes User defined event for JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "User defined event for JPanel" Watch "User defined event for JPanel" New topic
Author

User defined event for JPanel

laoniu gougou
Greenhorn

Joined: Jan 25, 2001
Posts: 25
Hi Gurus:
I have a MyPanel extends JPanel and have some buttons in it. When click button, I want MyPanel to issue event such that other Component can listen to MyPanel instead of having to Listen to the buttons inside MyPanel.
Will that possible to issue ActionEvent (or MyActionEvent which is subclass of ActionEvent) from MyPanel? If possible, how?
I guess would be difficult to do this.
Thanks
 
wood burning stoves
 
subject: User defined event for JPanel