Article View: borland.public.jbuilder.java.swing
Article #8531Re: Adding a row to a table model
From: Andreas Schnell
Date: Mon, 14 Aug 2000 00:00
Date: Mon, 14 Aug 2000 00:00
21 lines
1357 bytes
1357 bytes
"Lee-Ann" <lmccallion@telesoft-technologies.com> schrieb im Newsbeitrag news:39901961_1@dnews... > Hi > > I am trying to add a row to a table using a button. The addRow method > exists for the DefaultTableModel which is the model I am using but I cannot > access this method or the model name inside the button > Does this mean I have to override the existing addRow method or what??? I asume that you have a panel or a frame with your table and your button on it. So the frame or panel have a reference on the JTable. So add the reference on JTable to your button listener. There you can use mytable.getModel() to get the model and add a row for this model. The row should be displayed without any further things to do. Hope this helps Andreas Schnell
Technical Details
Message-ID:
<3997942a$1_2@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39901961_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4a81d0c0aa0382c8 X-Google-Attributes: gid111d45,public From: "Andreas Schnell" <Andreas.Schnell@innovations.de> Subject: Re: Adding a row to a table model Date: 2000/08/14 Message-ID: <3997942a$1_2@dnews> X-Deja-AN: 658026717 References: <39901961_1@dnews> X-Original-NNTP-Posting-Host: 207.105.83.65 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing