0

Hi, I'm creating a component for a process flow charting system, and have come to the point where I need to implement D&D between components. I have a panel containing expanding lists, where each list item represents a process definition. What I need to do is the following. Altogether, I'm going to have 3 controls derived from JPanel that will need to support D&D.

Process Definition Panel (Source)
These will be the cell components within the aforementioned list; each one will encapsulate a process definition, which should be draggable into the chart to either create or replace process instances.

Process Flow Chart Panel (Target)
This will contain the process flow chart. Dragging a process definition into this control should create a new process instance in the form of a process instance panel.

Process Instance Panel (Target)
This represents a process instance within the chart (i.e. they are the "boxes" within the flow chart). By dragging a process definition onto one of these, the existing process instance should be replaced by a new one spawned from the definition.

All I need is a nice simple explaination of how D&D works in Java using Swing. I've already started creating a helper class that creates DataFlavors and Transferables from objects, but I'm not sure where to go from there.

Thanks, Lee.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by kramerd
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.