Solved

Bubble Help

Posted on 1998-08-19
6
435 Views
Last Modified: 2010-08-05
How to develop bubble help in java? If a mouse is moved over a button than is there any way we can show a bubble
help next to the mouse pointer. this is possible in most of the Ms windows software. It would be great if someone could
send source code for it too...


0
Comment
Question by:jayeshp
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:sailwind
ID: 1222143
The answer is the JPopupMenu. It is a part of the JFC swing package for
JDK 1.1. You simply create an instance of it, and add it to the component
that you want it to show up over. I'll follow this up with some source code.
0
 
LVL 4

Expert Comment

by:evijay
ID: 1222144
0
 
LVL 4

Expert Comment

by:evijay
ID: 1222145
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 3

Expert Comment

by:sailwind
ID: 1222146
Oooops, I've mistaken what you were trying to do. What you really want is the
ToolTip. It is very very simple. Simply use the method setToolTipText on whichever
component you want, and viola, the tooltip appears. Below is a simple program
demonstrating this capability.

import com.sun.java.swing.*;

public class toolTest extends JFrame {

    public toolTest() {

        JButton button = new JButton("Button");
        button.setToolTipText("Press me!");

        getContentPane().add(button, "Center");
        setSize(100,50);
        setVisible(true);
    }

    public static void main(String s[]) {
        new toolTest();
    }
}
0
 

Author Comment

by:jayeshp
ID: 1222147
Hi all,
  Thanks for all the help. The answer given by sailwind is
perfect if i am using SWING. Its my mistake that i did not mention i was using JAVA 1.1.4. I have not started development in swing yet so i cannot use JButton component.
  The answer sent my evijay is perfect for java 1.1.4
After implementing the code i can see the  bubble help with
unsigned warning window. I want to get rid of the warning message which comes along with the tooltip in browser.
Can anyone help me in this.
 I than you for all the help again.
JAYESH


0
 
LVL 4

Accepted Solution

by:
evijay earned 50 total points
ID: 1222148
As you know, the help is displayed as a popupwindow. this window in an unsigned applet will be displayed with a warning. if you dont want it, there are two ways

sign the applet

implement the help as a lightweight label in each of the panel which has buttons needing the help. place the label initially in an invisible position (give negative coords for setPosition)
When the help need to be displayed, bring the label in front, position it  and display.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countX 22 70
endX challenge 2 50
What is JNDI datasource in spring 1 38
word0 challenge 4 54
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now