Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Internal Frames(urgent.....please!)

 
Big Mike
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application that spawns numerous internal frames. I need to detect which internal frame throws an event ans close that specific one.
When I create an instance of the internal frame, I add a vetoableChangeListener to it. Each internal frame is createdd the same exact way and the listener add likewise. How do I know that internal frame1 generated the event or if internal frame6 generated it.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either you need a separate listener for each frame, or you need to add the same listener to all the frames and then have it ask the event what its source was:

I would personally create a separate listener for each frame.


[This message has been edited by Cindy Glass (edited August 21, 2001).]
 
Big Mike
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey cindy, thanks for your suggestion and the latter is what I have chosen. It is working quite lovely.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic