Search Results

Search found 2 results on 1 pages for 'djclayworth'.

Page 1/1 | 1 

  • Drag and drop with an image

    - by DJClayworth
    I need to create a drag and drop system in swing where an image of the thing being dragged is attached to the cursor during the drag. In theory this is achieveable with public Icon getVisualRepresentation(Transferable t) but there appears to be a long standing bug (here) that means this method is never called. I know I can do it by implementing my own DnD system with DragSource etc., but does anyone know of an easier workround that will get me what I need?

    Read the article

  • Help on writing your own javax.swing.text.Document

    - by DJClayworth
    I'm writing a Java TextComponent where the underlying document has some structure. It is very short, basically one line. I need to be able to override the response to inserting or deleting characters in some parts of the document. My initial approach was to implement javax.swing.text.Document, but this seems to involve developing many associated classes (Element, EditorKit, View) and there don't seem to be many examples or tutorials on how to do this. There are plenty on using the pre-defined implementations. Can anyone point me at tutorials or other aids for simple implementations of Document and what other classes I need to create to make this work.

    Read the article

1