Java Reference
In-Depth Information
118 // tot.setText("SubAccounts: "+current.size());
119 val.setText("Remaining: $"+current.getBalance());
120
121 // disable the button if there is no "up" to go
122 if (current.getParent() == null) {
123 upton.setEnabled(false);
124 } else {
125 upton.setEnabled(true);
126 }
127
128 } // setStatus
129
130 private Component
131 createList()
132 {
133 JScrollPane retval;
134
135 model = new AbstractTableModel()
136 {
137 private String [] columnNames = {"Account", "Owner", "Value"};
138
139 public String
140 getColumnName(int col) {
141 return columnNames[col];
142 } // getColumnName
143
144 public int
145 getRowCount()
146 {
147 int retval;
148
149 if (current != null) {
150 retval = current.size();
151 } else {
152 retval = 1; // testing only
153 }
154
155 return retval;
156
157 } // getRowCount
158
159 public int getColumnCount() { return columnNames.length; }
160
161 public Object
162 getValueAt(int row, int col) {
163 Object retval = null;
164 Account aa = null;
165 // return "---"; // rowData[row][col];
166 int count = 0;
Search WWH ::




Custom Search