Solved

Bubble Help

Posted on 1998-08-19
6
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

630 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