package com.nameless.bank.frame;

import com.nameless.bank.logic.Account;

import javax.swing.table.AbstractTableModel;
import java.util.Vector;

/**
 * Created by  on 28.03.2016.
 */
public class AccountTable extends AbstractTableModel {
    private Vector accounts;

    public AccountTable(Vector accounts) {
        this.accounts = accounts;
    }

    public int getRowCount() {
        if (accounts != null) {
            return accounts.size();
        }
        return 0;
    }

    public int getColumnCount() {
        return 3;
    }

    public String getColumnName(int column) {
        String[] colNames = {"ID "," ", "  (.)"};
        return colNames[column];
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        if (accounts != null) {
            Account acc = (Account) accounts.get(rowIndex);
            switch (columnIndex) {
                case 0:
                    return acc.getId();
                case 1:
                    return acc.getHolder().getName();
                case 2:
                    return acc.getMoney();
            }
        }
        return null;
    }

    public Account getAccount(int rowIndex) {
        if (accounts != null) {
            if (rowIndex < accounts.size() && rowIndex >= 0) {
                return (Account) accounts.get(rowIndex);
            }
        }
        return null;
    }
}

@@ -165,16 +165,20 @@
 ated by 
+%D0%93%D0%BB%D0%B5%D0%B1
  on 28.0
@@ -655,19 +655,56 @@
 %22ID 
-%22,%22 %22, %22  (
+%D1%81%D1%87%D0%B5%D1%82%D0%B0%22,%22%D0%94%D0%B5%D1%80%D0%B6%D0%B0%D1%82%D0%B5%D0%BB%D1%8C %D1%81%D1%87%D0%B5%D1%82%D0%B0%22, %22%D0%9A%D0%BE%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE %D0%B4%D0%B5%D0%BD%D0%B5%D0%B3 (%D1%80%D1%83%D0%B1
 .)%22%7D

Update AccountTable.java