🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Removing Selected rows in JTable

#1366
From: John McGrath [TeamB]
Date: Tue, 20 Jan 2004 18:15
23 lines
1714 bytes
On 1/20/2004 at 11:00:40 AM, Delali Dzirasa wrote:

> This may be a silly question but doesn't this code handle that?

> JTable table = new JTable(myTable);

No.  That declares a new local variable, creates a JTable object, and
initializes the variable to refer to the newly newly created JTable.
The "table" member declaration is shadowed by the declaration, so it is
not affected.

What you probably want to do is to remove the "JTable" from that line:

   table = new JTable(myTable);

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <400d7e34$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newspeer1.nwr.nac.net!nntp.cifnet.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <400c0372@newsgroups.borland.com> <400c2d2b$1@newsgroups.borland.com> <400c3798$1@newsgroups.borland.com> <400c92ae@newsgroups.borland.com> <400d50a7$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c6be5540fdc67be3
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-01-20 11:36:48 PST
From: "John McGrath  [TeamB]" <ng-b@JPMcGrath.net>
Subject: Re: Removing Selected rows in JTable
Newsgroups: borland.public.jbuilder.java.swing
References: <400c0372@newsgroups.borland.com> <400c2d2b$1@newsgroups.borland.com> <400c3798$1@newsgroups.borland.com> <400c92ae@newsgroups.borland.com> <400d50a7$2@newsgroups.borland.com>
User-Agent: XanaNews/1.15.8.5
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 141.158.29.57
Message-ID: <400d7e34$1@newsgroups.borland.com>
Date: 20 Jan 2004 11:15:00 -0700
X-Trace: newsgroups.borland.com 1074626100 141.158.29.57 (20 Jan 2004 11:15:00 -0700)
Lines: 23
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newspeer1.nwr.nac.net!nntp.cifnet.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail