🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to update last row's column in JTable?

#13014
From: Vladimir Olenin
Date: Wed, 07 Oct 1998 00:00
61 lines
2504 bytes
This is a multi-part message in MIME format.
--------------EAA62D512223CD7871C1545C
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Well, it might be u really forgot to call a function in your code. It
just says to the registered components that table contents has been
update. The function should look like this:

     table.tableChanged(new TableModelEvent(table.getModel(),
                                            0, table.getRowCount()-1,
1));

Just try it. Think this would help.

                                    Vladimir Olenin

Tapio Holopainen wrote:
> 
> Hello to all!
> 
> I'm using JTable to data editor. I have added JTable my own model (which
> extends AbstractTableModel) to handle tables data.
> 
> Problem: when user is at last row and edits columns data,
> setValueAt(Object value, int row, int col)-method is not called when
> user presses enter (after editing).
> 
> Enter and setValue-method works just fine if not at last row, but when
> at last row user must accept modifications either arrow-keys or pressing
> mouse at different row. Is this known bug or do I make some basic
> errors?
> 
> Thanks for the answers.
> 
> - Tapio

-- 
=-+-=-+-=-+-=
Join in Java community now!
http://www.geocities.com/SiliconValley/Heights/9815
=-+-=-+-=-+-=
--------------EAA62D512223CD7871C1545C
Content-Type: text/x-vcard; charset=koi8-r;
 name="keenonjava.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir Olenin
Content-Disposition: attachment;
 filename="keenonjava.vcf"

begin:vcard
n:Vladimir;Olenin
x-mozilla-html:FALSE
adr:version:2.1
version:2.1
email;internet:keenonjava@collegemail.com
note:Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
end:vcard


--------------EAA62D512223CD7871C1545C--
Technical Details
Message-ID: <361AAA9C.6BA736E3@collegemail.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3619C83F.6F23ED4A@sysline.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,75b4b6d81fb5a685
X-Google-Attributes: gid111d45,public
From: Vladimir Olenin <keenonjava@collegemail.com>
Subject: Re: How to update last row's column in JTable?
Date: 1998/10/07
Message-ID: <361AAA9C.6BA736E3@collegemail.com>
X-Deja-AN: 398426268
References: <3619C83F.6F23ED4A@sysline.com>
X-Accept-Language: en,ru
Content-Type: multipart/mixed; boundary="------------EAA62D512223CD7871C1545C"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing