Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 398575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:45:43+00:00 2026-05-12T16:45:43+00:00

I have a custom swing component that is implemented similar to a JTree. It

  • 0

I have a custom swing component that is implemented similar to a JTree. It has a ComponentUI that renders an object list using a CellRenderer. The tooltip now correctly shows for each rendered cell, however it doesn’t track the mouse as I would like. For instance, if I have boxes layed out like this;

 [ box A ]    [ box B ]   [ box C ]   [ box D ]

If i drag the mouse across these boxes I will see the tooltip for box A where the mouse crosses the box A boundary. As I continue to move the mouse the tooltip will not track the pointer. When I leave the box the tooltip will appropriately disappear. When i cross box B the same thing happens.

My guess is that the tooltip is only updating the view when the contents of getToolTipText(MouseEvent event) change. The behavior I would like is to have the tooltip track the pointer position regardless of the contents returned by getToolTipText. A quick hack is to add and remove an empty space based on an even/odd number of calls to the method. This works, but bleh, it can’t be the way I am supposed to do it.

I’m looking for a graceful non-hack way of solving this problem. I’m hoping someone knows of some arcane flag somewhere that forces the tooltip to follow the mouse regardless of mouse content.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:45:43+00:00Added an answer on May 12, 2026 at 4:45 pm

    Override getToolTipLocation in your cell renderer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom Swing component called NavigationLink which extends JLabel and implements a
here I have a swing size question: I have a JTree which is contained
I'm doing a project where i need some custom swing components. So far I
I have custom event logger, and I want to test it. [Test] public void
I have custom tags [tag val=100][/tag] . How do I get val and whatever
I have custom control where i want to show some items. In generic.xaml defined
I would like to have the editor in my editable JTables select all text
I'm having problems using the DWM functionality of Windows Vista/7 on Java windows. I
Firstly, let me just say that I'm very new to JSR-170 and Jackrabbit/Lucene in
Here goes my first question. First of all I'm new with Java and still

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.