Java Drag and Drop

Shitij Agarwal

Greenhorn

Posts: 21

posted 12 years ago

Is the Java Drag and Drop feature available only for Swing components? Here's what I'd like to do: I am using a 3rd party charting software in which a chart (which is a Swing Component) has x and y axes that belong to a class that extends directly from java.lang.Object. Initially, when my application is run, there would be 2 waveforms displayed on the y-axis against a time scale on the x-axis. I would like to somehow drag one of the waveforms onto the x-axis so that the new chart will have only one waveform on the y-axis plotted against the other waveform on the x-axis (the time scale should simply disappear).

Is there any way it is even possible to do what i've mentioned?

Thanks.

Craig Wood

Ranch Hand

Posts: 1535

posted 12 years ago

Sounds like some fun. It feels possible, yes; or maybe, depending on specifics. Can you show an image of what this (graph of the two waveforms) looks like? What kind of data are you using for the graph, eg, float array for ordinate and ints for abcissa? Do you want to simply replace the abcissa with one of the waveforms? Otherwise, I don't understand what you mean by plotting one against the other. Is it possible that you could move the waveform with a button event instead of a drag–and–drop action?