This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "User defined event for JPanel" Watch "User defined event for JPanel" New topic

User defined event for JPanel

laoniu gougou

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.
wood burning stoves
subject: User defined event for JPanel
Similar Threads
java repaint the frame or the panel?
How to place stuff without a layout?
Can I make a JPanel perform an action?
Problem with custom painting and multiple JPanel
where to define my menubar