Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ToolTipManager.sharedInstance().registerComponent(jgraph);
- jgraph.addMouseListener(new MouseAdapter() {
- public void mousePressed(MouseEvent e) {
- if (e.getClickCount() == 2) {
- int x = e.getX(), y = e.getY();
- Object cell= jgraph.getFirstCellForLocation(x, y);
- if (cell != null) {
- String lab = jgraph.convertValueToString(cell);
- jgraph.setToolTipText(lab);
- System.out.println(lab);
- }
- }
- }
- });
Add Comment
Please, Sign In to add comment