hover for help

Hey everybody

I'm trying to do a "hover for help or info" in my program but I'm using Menu and menuItems and I don't know if it is possible...

I'm not sure but there is a function similar like the one I want for jButtons (setToolTipText).

Anybody know how to do this?

Thanks in advance

[320 byte] By [eddies1j2a] at [2007-11-27 10:27:56]
# 1

setToolTipText() is a method in JComponent, so it can be used for any Swing Component.

CaptainMorgan08a at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...
# 2

Try using JMenu and JMenuItems, if you aren't already.

CaptainMorgan08a at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...
# 3

nope, I'm not using jMenu or jMenuItems so if I don't have another option I guess I will have to change everthing.

eddies1j2a at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...
# 4

if i change everthing to swing (JMenu, etc) what do I have to import?

I saw this in an example..

import java.awt.*;

import java.awt.event.*;

import javax.swing.JMenu;

import javax.swing.JMenuItem;

import javax.swing.JCheckBoxMenuItem;

import javax.swing.JRadioButtonMenuItem;

import javax.swing.ButtonGroup;

import javax.swing.JMenuBar;

import javax.swing.KeyStroke;

import javax.swing.ImageIcon;

import javax.swing.JPanel;

import javax.swing.JTextArea;

import javax.swing.JScrollPane;

import javax.swing.JFrame;

but what is the difference in doing this?

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

Thanks

eddies1j2a at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...
# 5

http://forum.java.sun.com/thread.jspa?threadID=560813

or

http://www.google.com/search?q=different+between+awt+and+swing&client=netscape-pp&rls=com.netscape:en-US

drvijayy2k2a at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...
# 6

> but what is the difference in doing this?

Laziness!

floundera at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...
# 7

So you think I should change the AWT components to Swing? I guess if it is better or more efficient than AWT than I should do it

or can I do a mixture of both or is that inefficient or not acceptable?

Thanks everyone and thanks for the information

eddies1j2a at 2007-7-28 17:48:49 > top of Java-index,Java Essentials,Java Programming...