| Author |
reference problem in drag and drop
|
mark smith
Ranch Hand
Joined: Apr 05, 2005
Posts: 242
|
|
hi
i add some ButtonComponent on a jpanel.
ButtonComponent extend jbutto and have an object who have some property.
in the getCommand function of my ButtonComponent i do
it's like i have a reference problem because when i drag a component, change property of object, i drag another one... object property have same values then the first one.
any idea?
thanks
|
 |
mark smith
Ranch Hand
Joined: Apr 05, 2005
Posts: 242
|
|
instead of used this code
String mimeType = DataFlavor.javaJVMLocalObjectMimeType + ";class=" + CommandBeans.class.getName();
DataFlavor dataFlavor = new DataFlavor(mimeType, "command");
in my Transferable, TransferHandler class
i used
that seem to have fixed the reference problem.
|
 |
 |
|
|
subject: reference problem in drag and drop
|
|
|