J
Jason Cavett
I have successfully implemented cut/copy/paste in a JTree by
implmenting my own TransferHandler and Transferrable object. It works
great and I am very impressed with the underlying support and how
relatively easy it was to understand and implement.
I am attempting to do the same thing with a JPanel. This JPanel holds
JLabels and I want to be able to cut/copy/paste the labels within that
panel. According to the drag and drop tutorial (found at:
http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html) a
JPanel does not provide out-of-the-box support for cut/copy/paste, but
I should be able to write my own implementation to handle this.
I tried to do something similar to what I did with the JTree, but, for
some reason, my JPanel is not triggering the cut/copy/paste event.
I'm guessing this has something to do with the non-out-of-the-box
support, but I'm not really sure.
Does anybody have any suggestions or ideas of where to look next?
Thanks.
implmenting my own TransferHandler and Transferrable object. It works
great and I am very impressed with the underlying support and how
relatively easy it was to understand and implement.
I am attempting to do the same thing with a JPanel. This JPanel holds
JLabels and I want to be able to cut/copy/paste the labels within that
panel. According to the drag and drop tutorial (found at:
http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html) a
JPanel does not provide out-of-the-box support for cut/copy/paste, but
I should be able to write my own implementation to handle this.
I tried to do something similar to what I did with the JTree, but, for
some reason, my JPanel is not triggering the cut/copy/paste event.
I'm guessing this has something to do with the non-out-of-the-box
support, but I'm not really sure.
Does anybody have any suggestions or ideas of where to look next?
Thanks.