예제 #1
0
 protected void initList() {
   vData.clear();
   List<AccountVO> list = ac.getAccounts();
   for (AccountVO vo : list) {
     vData.add(vo);
   }
   this.repaint();
 }
예제 #2
0
 private void deleteAccount() throws RemoteException {
   int index = table.getSelectedRow();
   if (index == -1) {
     JOptionPane.showMessageDialog(null, "请选择一个账户", "", JOptionPane.ERROR_MESSAGE);
     return;
   }
   int n = JOptionPane.showConfirmDialog(null, "确定删除此账户吗?", "", JOptionPane.YES_NO_OPTION);
   if (n != 0) return;
   ac.deleteAccount(vData.get(index));
   initList();
   return;
 }