Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bubble Help

Posted on 1998-08-19
6
Medium Priority
?
443 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

719 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