f



How to D&D JLabel?

I have added 8 x 8 = 64 JPanels on frame's content pane
with GridLayout and black/white alternate background color.
Yes, it's a chess board.

On each of those small JPanels, I can add a JLabel with
ImageIcon. Yes, they are chess pieces.

I saw in the JDK documentation how to D&D a text from a
JTextField onto a JLabel. But, how could I do D&D JLabel
over such multiple JPanels as the above chess board?

Could you give simple example code or pointers for them?

Thanks in advance.
0
HGA03630
2/2/2005 8:50:04 AM
comp.lang.java.gui 8286 articles. 0 followers. Post Follow

1 Replies
595 Views

Similar Articles

[PageSpeed] 58

"hiwa" <HGA03630@nifty.ne.jp> wrote in message
news:6869384d.0502020050.991a22c@posting.google.com...
>I have added 8 x 8 = 64 JPanels on frame's content pane
> with GridLayout and black/white alternate background color.
> Yes, it's a chess board.
>

Take a look at DragPictureDemo from The Java Tutorial
http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html#customComp



0
kunta
2/2/2005 10:30:52 AM
Reply: