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.
kunta - 02 Feb 2005 10:30 GMT
>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