The Artima Developer Community
Sponsored Link

Java Answers Forum
panels

1 reply on 1 page. Most recent reply: Mar 20, 2002 2:13 PM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
angela

Posts: 2
Nickname: tange
Registered: Mar, 2002

panels Posted: Mar 20, 2002 1:25 PM
Reply to this message Reply
Advertisement
can you pass panels in the action performed event


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: panels Posted: Mar 20, 2002 2:13 PM
Reply to this message Reply
in the method

public void actionPerformed(ActionEvent ae){
 
}

from the ActionEvent object you can get the source
using the getSource() method to get the source object that fired the event.

You could test to see if your panel is the ancestor of source object with the method

public boolean isAncestorOf(Component c)

Flat View: This topic has 1 reply on 1 page
Topic: Execute the file Previous Topic   Next Topic Topic: java.lang.ClassFormatError: Bad major verision number

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use