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 8988913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:07:33+00:00 2026-06-15T22:07:33+00:00

I want to set setDissmissDelay() method multiple times, but I could not set it

  • 0

I want to set setDissmissDelay() method multiple times, but I could not set it for a specific value again and again. I also tried to use an infinite loop, and tried to override (ToolTipManager Constructor is on default modifier).

I know for sure the code is working properly as I can see it’s printing the e.getsource() in console. I was trying to solve this issue asked by someone (This Question) and while solving that I became stumped at this point. What is the reason behind that? And if I can set the value how can it be? Is there any other way to achieve this?

Here is my code snippet:

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.*;

public class Hello {
    static JButton button;

    private static void createAndShowGUI() {
        JFrame frame = new JFrame("HelloWorldSwing");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        button = new JButton("Hello World");
        button.setToolTipText("Its a tool tip Experiment!");
        frame.getContentPane().add(button);
        button.addMouseListener(new MouseAdapter() {

            @Override
            public void mouseEntered(MouseEvent e) {

                if (e.getSource() == button) {
                    ActionListener tt = new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            ToolTipManager.sharedInstance().setDismissDelay(
                                    1000);
                            System.out.println(e.getSource());
                        }
                    };
                    new Timer(100, tt).start();
                }
            }
        });
        frame.pack();
        frame.setVisible(true);

    }

    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }
}

Please guide me through this.

  • 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-06-15T22:07:34+00:00Added an answer on June 15, 2026 at 10:07 pm

    Calling setDismissDelay() is a global setting to indicate how long should a Tooltip remain on the display before it is removed. It does not reset the time until when the current tooltip is removed. As suggested in your linked question setting the dismiss delay, once and for all, to Integer.MAX_VALUE should do the trick.

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

Sidebar

Related Questions

I want set Listbox background to transparent but not working Is there any idea?
i have a multiple marker Google map, it works fine but i want set
i want set value of input type if condition is true but my function
i want set class for repeater when doPostBack for those dataID i wan but
I want to set a repeating alarm monthly; but my app resets the alarm
I want to set the type of a list to be ints but I
How To Set DatePreference Default Value From Java Side. I Want Set to Date
I hava a method setData(ArrayList<super> list) , so anyone who want set data can
I want set result to variable from MVC controller method. function someFunction(){ var result;
I want set different access for different modules. I tried out $this->allow($role, $module, $controller,

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.