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

11
LINES

< > BotCompany Repo | #1007220 // tableColumnWidthsByName

JavaX fragment (include)

static Map<S, Int> tableColumnWidthsByName(JTable table) {
  TableColumnModel tcm = table.getColumnModel();
  if (tcm == null) null;
  int n = tcm.getColumnCount();
  new TreeMap<S, Int> map;
  for i to n: {
    TableColumn tc = tcm.getColumn(i);
    map.put(str(tc.getHeaderValue()), tc.getWidth());
  }
  ret map;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007220
Snippet name: tableColumnWidthsByName
Eternal ID of this version: #1007220/5
Text MD5: 1f74662e19c9a5ed259144f18b98ee7f
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-30 14:02:05
Source code size: 327 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 475 / 490
Version history: 4 change(s)
Referenced in: [show references]