Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regaining functionality from saved file

Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm working on a project where I'm saving to file a subclass of JPanel,
which in turn contains other objects. All the objects being saved in the
project implement Serializable. I have no problem saving to file and
re-opening the file. But some functionality of the objects are lost! For
instance, all the objects have an inner class that extends MouseAdapter,
like this:

Once I open the file and click on the object, this mousePressed(....) method
is supposed to fire. But it doesn't. The call to
JTestComposer.setEditor(MyComponent.this); actually brings up a Properties
dialog box for this object. I can't get the Properties dialog box though if
mousePressed(...) doesn't fire.

What's the reason for this? How do I fix it?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic