Results 1 to 11 of 11
Thread: Tool tips - Netbeans 6.5
- 04-09-2009, 04:29 PM #1
Tool tips - Netbeans 6.5
I have all the tooltips working but the positioning of them is not that good, is it possible to have them appear where you want, the problem I have is that the tool tip opens up about a centimeter away from where it should be indicating, I would prefer that it opened just above it
Can this be done?
Thanks in advance
- 04-09-2009, 04:49 PM #2
- 04-09-2009, 04:51 PM #3
So your saying that it is not possible to relocate them?
- 04-09-2009, 04:56 PM #4
I think so. I've go through the JToolTip API as well. On method summery I couldn't find such thing too.
JToolTip (Java Platform SE 6)
- 04-09-2009, 05:06 PM #5
Seems it's not a difficult task lol. Look at the following example. I found on the web.
ToolTip Location Example : Tooltip*«*Swing JFC*«*Java
- 04-24-2009, 04:32 PM #6
Netbeans 6.5 tooltips, depending on selection
I have all my tooltips working and they are in required locations however,
I have two textfields, 1 is for height and one is for weight, they have two radio buttons which let you select either metric measurements or imperial.
Basically what I want to do is if the user selects metric I want the tooltip to say ' enter your measurements in Cm and Kg' however if the user selects imperial I want the user to see the tooltip 'Enter your measurements in Inches and lb's'
I have taken a look around and even the netbeans site but I cannot seem to get this working, is this possible I think is my first question?
- 04-24-2009, 05:15 PM #7
Sure... What you will have to do is create a private String and call it say... RadioButtonToolTip...
Now in your setTooTipText() method use your RadioButtonToolTip String... Now in the actionListener of the radio Buttons you can set the text of your RadioButtonToolTip string... So when the radioButton gets selected, it will set your RadioButtonToolTip to your desired text...
Also, on a different note, did you ever get your F1 Help menu worked out???Who Cares... As Long As It Works...
- 04-24-2009, 05:29 PM #8
Thanks for the information, as for the f1, ermmmm no for the moment I gave up on that, I couldnt make sense of what I needed to do.
I will let you know when or IF I get the tooltip as I want it....lol
- 04-24-2009, 05:36 PM #9
No Prob... Let me know...Who Cares... As Long As It Works...
- 04-25-2009, 01:44 AM #10Senior Member
- Join Date
- Mar 2009
- Rep Power
Seems that simply calling setToolTipText within the action would work as well... just an alternate way of changing the ToolTipText, markw8500 had a great suggestion as wellIf the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
- 04-25-2009, 02:10 AM #11
- By gissah in forum New To JavaReplies: 0Last Post: 03-26-2009, 04:07 PM
- By kulangotski in forum Advanced JavaReplies: 4Last Post: 03-09-2009, 05:09 PM
- By PVL268 in forum New To JavaReplies: 4Last Post: 02-27-2009, 02:37 PM
- By Komala_aradhya in forum New To JavaReplies: 1Last Post: 08-03-2007, 01:25 PM