Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dnd + custom objects

Status
Not open for further replies.

freggy

Programmer
Nov 7, 2001
4
BE
Hello,

Can I drag and drop custom objects with java. I've created a testcase with strings and it works fine. But now i want to drag and drop a object. I don't have an idea how to start... For e.g. what should i do with the dataflavor?

I've created the following classes:
DragList: extends a JList, contains a listmodel who contains custom objects.
CustomObject: contains for e.g. a name and a tostring method.
DropLabel: contains an custom object. and shows the name of the custom object


Now i want to drag a custom object for the list to the label. What are the differences with dragging Strings?


Waiting for your answers...
frederic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top