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

10
LINES

< > BotCompany Repo | #1005991 // tableLineAsRawMap - keeps objects as they are (e.g. images)

JavaX fragment (include)

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

Author comment

Began life as a copy of #1003835

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005991
Snippet name: tableLineAsRawMap - keeps objects as they are (e.g. images)
Eternal ID of this version: #1005991/1
Text MD5: b303dfe4c127fab8f2ba88b5663225b1
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-13 23:57:55
Source code size: 368 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 533 / 555
Referenced in: [show references]