🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8325

Re: How to assign different tooltips to seperate cells

#8325
From: John P. McGrath
Date: Wed, 20 Sep 2000 00:00
18 lines
1086 bytes
On Tue, 19 Sep 2000 14:29:33 +0200, Andreas Wollny wrote:

> Hello
> 
> I'm trying to set different Tooltip-Texts to seperate Cells.
> All examples I've seen always show, ho to set tooltip for columns or 
> header and not for single cells.

The technique is the same:  override getToolTipText(MouseEvent) to return 
the appropriate tool tip based on the position specified in the mouse 
event.  To do this, you will have to convert the mouse screen coordinates 
to cell coordinates.  Use the JTable columnAtPoint() and rowAtPoint() 
methods to do the conversion.

-- 
Regards,

John McGrath
Technical Details
Message-ID: <MPG.143227c94058065b989b5c@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39C75C2D.D56B69E2@metris.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,1bf4c45e37e1991b
X-Google-Attributes: gid111d45,public
From: John P. McGrath <JPMcGrath@fast.net>
Subject: Re: How to assign different tooltips to seperate cells
Date: 2000/09/20
Message-ID: <MPG.143227c94058065b989b5c@forums.borland.com>
X-Deja-AN: 671937081
References: <39C75C2D.D56B69E2@metris.de>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing