Custom Cursor Mouse
I'm working on a canvas and need to transform
my mouse cursor to a table containing some
attributes when passing on some elements
inside the canvas.
I can catch the "mouse over" and "mouse out"
events, but I can't transform my mouse Cursor.
The final effect I need is something like the little
window that opens when passing the mouse on
advertising links when browsing the internet..
Any ideas on how could I do that with Swing?
Have a look at the Toolkit.createCustomCursor( ... ) method.
Thanks for your answer, JosAH.
The problem with createCustomCursor(..) is that
it doesn't allow to use a java Component (panels,
frames..?) as cursor, but only java.awt.Image
Is there a way to "cast" a JTable to an Image so
that I can print the content of a bean in a box to
use as a cursor? Or if not a JTable then everything
else that allows to use it as a cursor?
Any JComponent can be made into an image by creating a BufferedImage the size of the JComponent, extracting the BufferedImage's Graphic object, and drawing the component with this Graphics object (I think these are the steps as it's been a while since I've done this).