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

10
LINES

< > BotCompany Repo | #1003835 - getTableLineAsMap

JavaX fragment (include)

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

Author comment

Began life as a copy of #1001755

download  show line numbers  debug dex   

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

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: 421 / 375
Referenced in: [show references]

Formerly at http://tinybrain.de/1003835 & http://1003835.tinybrain.de