🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #779

regaining functionality from save file

#779
From: Alan Shiers
Date: Mon, 27 Dec 2004 17:00
27 lines
1863 bytes
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:

class ItemListener extends MouseInputAdapter
 {
    public void mousePressed(MouseEvent e)
    { System.out.println("mousePressed");
      if(type != InputType.TEXTBOX)
        JTestComposer.setEditor(MyComponent.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?

Alan
Technical Details
Message-ID: <41d0409e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,24838fa202265eb4,start
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Alan Shiers" <ashiers@hfx.eastlink.ca>
Newsgroups: borland.public.jbuilder.java.swing
Subject: regaining functionality from save file
Date: Mon, 27 Dec 2004 13:00:18 -0400
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 24.222.101.2
Message-ID: <41d0409e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104167070 24.222.101.2 (27 Dec 2004 09:04:30 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail