Article View: borland.public.jbuilder.java.swing
Article #11080Re: Change the font of ToolTipText
From: Lars Roe
Date: Wed, 14 Jul 1999 00:00
Date: Wed, 14 Jul 1999 00:00
48 lines
1670 bytes
1670 bytes
This can change the font for one ToolTip, but an easy way to
change all ToolTip's would be:
UIManager.put("ToolTip.font", new
javax.swing.plaf.FontUIResource(myFont));
After this line, all ToolTips you make will have the font
'myFont'.
-lars
Anil Kumar wrote:
>
> Try this. It's tested using JDK1.2. Let me know if this works.
>
> JButton button3 = new JButton("Next")
> {
> public JToolTip createToolTip()
> {
> JToolTip tt = new JToolTip();
> tt.setFont(new Font("Courier", Font.BOLD, 12));
> return tt;
> }
> };
> button3.setToolTipText("Click here for Next");
>
> Let me know if this works.
> -Anil Kumar
>
> Boris Villazon wrote in message
> <3784F5D9.E6315D30@estudiantes.ucbcba.edu.bo>...
> >Hi:
> >
> >I want to change the font of the tooltiptext.
> >
> >I proved with jtooltip but it don't make changes.
> >
> >How can I do this?
> >
> >Thanks in advance
> >
> > Boris Villaz�n
> >
--
Lars Roe
612-624-6711
roex0029@tc.umn.edu
Technical Details
Message-ID:
<378CC9EB.74F55E28@tc.umn.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3784F5D9.E6315D30@estudiantes.ucbcba.edu.bo> <7mg4jb$t513@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,b7722a2c22626d17 X-Google-Attributes: gid111d45,public From: Lars Roe <roex0029@tc.umn.edu> Subject: Re: Change the font of ToolTipText Date: 1999/07/14 Message-ID: <378CC9EB.74F55E28@tc.umn.edu> X-Deja-AN: 500998786 Content-Transfer-Encoding: 8bit References: <3784F5D9.E6315D30@estudiantes.ucbcba.edu.bo> <7mg4jb$t513@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 Organization: UM Mime-Version: 1.0 Reply-To: Lars.W.Roe-1@tc.umn.edu Newsgroups: borland.public.jbuilder.java.swing