You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
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 .
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.