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

18
LINES

< > BotCompany Repo | #1003694 // tableWithTooltips

JavaX fragment (include)

1  
static TableWithTooltips tableWithTooltips() {
2  
  ret (TableWithTooltips) swing(func { new TableWithTooltips });
3  
}
4  
5  
sclass TableWithTooltips extends JTable {
6  
  public String getToolTipText(MouseEvent e) {
7  
    String tip = null;
8  
    Point p = e.getPoint();
9  
    int rowIndex = rowAtPoint(p);
10  
    int colIndex = columnAtPoint(p);
11  
12  
    try {
13  
      ret str(getValueAt(rowIndex, colIndex));
14  
    } catch {
15  
      null;
16  
    }
17  
  }
18  
}

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: 543 / 564
Version history: 1 change(s)
Referenced in: [show references]