copy selected data from JTable's cell to clipboard
posted 15 years ago
Have an uneditable JTable, in which the cells are rendered either with JTExtField or JTextArea. User needs ability to select data from the cell by mouse drag and copy the selected data to the clipboard. Unable to get the JTable to allow to select data from the cell and then copy to the clipboard. Would appreciate any help on this. ------------------
posted 11 years ago
This is an old post, but I've been dealing with the same thing and thought I'd show what I've done thusfar. This solution works most of the time, but gets a little flaky when a custom renderer is used.
Does anyone know a foolproof way to harness data from a particular cell, as formatted by the appropriate renderer? Some of my columns store calendars, and I need to get the pretty mm/dd/yyyy output instead of the book Calendar.toString() prints out.