I made a jTable of users. What I wanna do is, to show user's photo near the cursor, on click event of row. (I mean I want to show something like tooltip) Is that possible and how can I do it? Like this.but my app is desktop application
http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html
Asked
Active
Viewed 743 times
0

mKorbel
- 109,525
- 20
- 134
- 319

Serxan Resullu
- 25
- 1
- 9
-
what does this have to do with derby? – bmargulies Apr 12 '12 at 16:45
-
Look at this question http://stackoverflow.com/questions/8332159/how-to-add-tooltips-to-jtables-rows – talnicolas Apr 12 '12 at 16:48
1 Answers
2
1) Google. 2) http://www.roseindia.net/java/example/java/swing/ImageToolTip.shtml
import javax.swing.*;
import javax.swing.text.html.*;
import java.awt.*;
import java.awt.event.*;
public class ImageToolTip {
public static void main(String[] args) {
JFrame frame = new JFrame("Image Tool Tip Frame");
JComponent button = new JButton("Cut");
String tooltiptext = "<html>" + "This is the " + "<img src=\"file:cut.gif\">" + " tool tip text." + "</html>";
button.setToolTipText(tooltiptext);
JPanel panel = new JPanel();
panel.add(button);
frame.add(panel, BorderLayout.CENTER);
frame.setSize(400, 400);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

jpalm
- 2,297
- 1
- 21
- 27