Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning Java 2
|
BOOK: Beginning Java 2
This is the forum to discuss the Wrox book Beginning Java 2, SDK 1.4 Edition by Ivor Horton; ISBN: 9780764543654
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Java 2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 25th, 2003, 10:17 AM
Registered User
 
Join Date: Oct 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default AbstractTableModel.fireTableStructureChanged()

I'm having trouble trying to refresh my JTable it seems
that all of my data have been repeated twice this is a major inconvinience is there anyway I can implement the AbstractTableModel.fireTableStructureChanged()
it was said that it could upload the data again so it wouldn't be any repitition anyway here is the program
before that thank you for trying to help me solve this

import java.util.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.util.Vector;


public class AddressTable extends JPanel
{
AddressBook addbook;
DefaultTableModel tablemodel = new DefaultTableModel();
JTable jt;
public AddressTable(AddressBook addbook)
{
this.addbook = addbook;

jt = new JTable(addbook.showTable());
add(new JScrollPane(jt));
setLayout(new FlowLayout());
}

public void refreshlist()
{
jt = new JTable(addbook.showTable());

}

/
}










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.