class AddressBook2 extends JFrame
{
//String[][] addresses = {{"Hancock, Bob", "01202719029", "07676101393",
//"1 Charminster Road, Bournemouth, Dorset, BH8 8UE"}};
DefaultTableModel contactsTable;
JTable table;
Vector<Object> vectors = new Vector<Object>();
public AddressBook2() throws IOException
{
this.setSize(new Dimension(640, 480));
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLayout(new GridBagLayout());
BufferedReader fileIn = new BufferedReader(new FileReader("AddressBook.buab"));
while (true)
{
String line = fileIn.readLine();
if (line == null)
break;
vectors.add(line);
//System.out.println(addresses2);
}
fileIn.close(); |