How about using JComponent.getToolTipText(MouseEvent event) ?
 
Jonathan

--

Jonathan Oddy
S
ERVICEPower Business Solutions Ltd
Petersgate House - St Petersgate - Stockport - SK1 1HE

Tel  : +44 (0)161 476 2277
Email: [EMAIL PROTECTED]

-----Original Message-----
From: Arnaud Hallais [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 16:12
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Tooltips in JList

Hello,
 
I'd like to make a JList which displays different tooltips depending on which item the mouse is on. Is there any simple way to do this, I did not find it, sorry!
 
1 - I tryed to overwrite the JList method getToolTipText() but I am missing the position of the mouse so I can't determine which item is under the mouse
2 - I tryed to overwrite the DefaultListCellRenderer method getListCellRendererComponent to has a tooltip to all of the item coponents but they are Component not JComponent so no setTooltipText() method.
3 - I am stuck!
 
thanks for any advise
 
a++

Reply via email to