🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: regaining functionality from save file

#781
From: Alan Shiers
Date: Tue, 28 Dec 2004 02:26
27 lines
1946 bytes
Thanks Arthur ... since the class ItemListener was an inner class, I didn't
realize it too needed to be Serializable as is the outer class.

Now that that is solved...I have one other problem which you might be able
to answer. One of the classes I created called Table has a member of
primitive type int. Like so:

public class Table extends JPanel implements Serializable
{
  ...
  private static int RowCount = 0;
  ...
}

Table winds up being one of the objects being saved to file.
When I open the file for some reason this Table object doesn't retain the
state of what RowCount held originally when it was saved.

Is it because it was declared static or something silly like that?

When the file loads it displays all the TableRow objects in the Table as
expected, but for some reason RowCount doesn't retain the number it had of
these TableRow objects.

Any ideas?

Alan
Technical Details
Message-ID: <41d0c540$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41d0409e$1@newsgroups.borland.com> <41d07923@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,24838fa202265eb4
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
References: <41d0409e$1@newsgroups.borland.com> <41d07923@newsgroups.borland.com>
Subject: Re: regaining functionality from save file
Date: Mon, 27 Dec 2004 22:26:11 -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: <41d0c540$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104201024 24.222.101.2 (27 Dec 2004 18:30:24 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail