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

18
LINES

< > BotCompany Repo | #1003694 // tableWithTooltips

JavaX fragment (include)

static TableWithTooltips tableWithTooltips() {
  ret (TableWithTooltips) swing(func { new TableWithTooltips });
}

sclass TableWithTooltips extends JTable {
  public String getToolTipText(MouseEvent e) {
    String tip = null;
    Point p = e.getPoint();
    int rowIndex = rowAtPoint(p);
    int colIndex = columnAtPoint(p);

    try {
      ret str(getValueAt(rowIndex, colIndex));
    } catch {
      null;
    }
  }
}

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: #1003694
Snippet name: tableWithTooltips
Eternal ID of this version: #1003694/2
Text MD5: 9ec509b8321b4b4f42f636931c84b6f5
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-04 15:53:58
Source code size: 438 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 601 / 624
Version history: 1 change(s)
Referenced in: #1003763 - tableWithToolTips - synonym of tableWithTooltips
#1006654 - Standard functions list 2 (LIVE, continuation of #761)