The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » LWUIT

Thread: ToolTip

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 5 - Last Post: Aug 30, 2008 4:10 PM by: fred34
cozmint

Posts: 50
ToolTip
Posted: Aug 29, 2008 2:04 AM
 
  Click to reply to this thread Reply

Hi,

What would be the best way to implement a tooltip for some components? I'm looking to display for 2 seconds a tip above the component when the user selects it. Modeless dialog, glasspane or something else?

Thanks

chen
Re: ToolTip
Posted: Aug 29, 2008 5:39 AM   in response to: cozmint
  Click to reply to this thread Reply

Hi,
The best way would be to use glasspane.

Regards,
Chen



lwuit-users@mobileandembedded.org wrote:
> Hi,
>
> What would be the best way to implement a tooltip for some components? I'm looking to display for 2 seconds a tip above the component when the user selects it. Modeless dialog, glasspane or something else?
>
> Thanks
> [Message sent by forum member 'cozmint' (cozmint)]
>
> http://forums.java.net/jive/thread.jspa?messageID=296103
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net


aberrant

Posts: 90
Re: ToolTip
Posted: Aug 29, 2008 7:24 AM   in response to: cozmint
 
  Click to reply to this thread Reply

Or you could try JXLayer : https://jxlayer.dev.java.net/

If for some reason you are unable to use a 3rd party library you might try something like this: http://wiki.java.net/bin/view/Projects/RootPaneDemo It wraps any component and gives it it's own private glasspane. JXlayer is far more advanced though, so if you can I'd recommend using that.

Good luck.

fred34

Posts: 128
Re: ToolTip
Posted: Aug 29, 2008 3:22 PM   in response to: cozmint
 
  Click to reply to this thread Reply

I'm going to have to ask the obvious question here...what's wrong with the default implementation of JToolTip and the methods in JComponent? They provide precisely the behaviour you're asking for.

cozmint

Posts: 50
Re: ToolTip
Posted: Aug 29, 2008 3:55 PM   in response to: fred34
 
  Click to reply to this thread Reply

Let's try not to mix LWUIT with Swing.

fred34

Posts: 128
Re: ToolTip
Posted: Aug 30, 2008 4:10 PM   in response to: cozmint
 
  Click to reply to this thread Reply

oops, I read the post above and mine and forgot check which forum this was.




 XML java.net RSS