Results 1 to 7 of 7
- 01-21-2008, 01:21 PM #1
Member
- Join Date
- Jan 2008
- Posts
- 8
- Rep Power
- 0
- 01-21-2008, 07:24 PM #2
Member
- Join Date
- Jan 2008
- Posts
- 3
- Rep Power
- 0
textField.setToolTipText("some text goes here");
See:
How to Use Tool Tips (The Java™ Tutorials > Creating a GUI with JFC/Swing > Using Swing Components)
- 01-23-2008, 12:17 PM #3
Member
- Join Date
- Jan 2008
- Posts
- 8
- Rep Power
- 0
thnx
thnx man, but what i need is when i set focus to text field it takes a time to display the tooltip and i want describe the case for u:
i have a jtextfield when i set focus into it i want to show tooltip thta shows a description about it and i don't want to disappear that tooltip until the focus lost from the jtextfield .
thnx
- 01-24-2008, 12:24 AM #4
You can make up a JWindow and add a label with your text to it. Set the background of the JWindows contentPane to
UIManager.getColor("ToolTip.background").
Add a FocusListener to the textField. On focusGained you can set the location of the tooltip relative to the textField with
Point p = ((JTextField)e.getSource()).getLocation();
from inside the method. Show the JWindow. Set it not-visible in focusLost.
- 01-27-2008, 01:49 PM #5
Member
- Join Date
- Jan 2008
- Posts
- 8
- Rep Power
- 0
thnx
thank u for ur .
help its works fine now, thnx
- 02-01-2008, 07:51 AM #6
Member
- Join Date
- Feb 2008
- Posts
- 9
- Rep Power
- 0
how to create tooltip over a sphere in java 3d....??
if anyboby know...
Roshith.
- 02-01-2008, 12:02 PM #7
Member
- Join Date
- Feb 2008
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
set focus to the textfield
By paty in forum New To JavaReplies: 2Last Post: 07-09-2010, 08:28 AM -
how to focus to another JTextfield?
By birdofprey in forum AWT / SwingReplies: 2Last Post: 04-09-2008, 01:08 PM -
JTable Focus Traversal
By helios_lie in forum AWT / SwingReplies: 1Last Post: 12-20-2007, 10:27 AM -
Focus
By Marty in forum AWT / SwingReplies: 1Last Post: 05-31-2007, 02:16 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks