Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1003835 // getTableLineAsMap

JavaX fragment (include)

1  
static Map<S, S> getTableLineAsMap(JTable tbl, int row) {
2  
  if (row >= 0 && row < tbl.getModel().getRowCount()) {
3  
    Map<S, S> map = litorderedmap(); // keep order of columns
4  
    for (int i = 0; i < tbl.getModel().getColumnCount(); i++)
5  
      map.put(tbl.getModel().getColumnName(i),
6  
        String.valueOf(tbl.getModel().getValueAt(row, i)));
7  
    ret map;
8  
  }
9  
  ret null;
10  
}

Author comment

Began life as a copy of #1001755

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003835
Snippet name: getTableLineAsMap
Eternal ID of this version: #1003835/1
Text MD5: f4f78e88d4c2271ea3511bff7304029d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-11 23:34:32
Source code size: 384 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 670 / 625
Referenced in: [show references]