I would like to set up a jFileChooser as an editor of a single cell of a table (not entire columns of that table as various other editors such as comboBox etc will be used). Any suggestion or sample code please? (I have already looked into these samples here How to use tables by Oracle
Asked
Active
Viewed 1,024 times
1
-
3*"Any suggestion or sample code please?"* Any sign of effort please? [What have you tried?](http://www.whathaveyoutried.com/) I mean *besides* asking random strangers on the internet to do it for you. – Andrew Thompson Jun 12 '12 at 19:05
-
can you check out this question please? http://stackoverflow.com/questions/11041575/using-all-jcombobox-jtextfield-jfilechooser-as-table-editor-overrides-the-re – C graphics Jun 14 '12 at 23:46
1 Answers
5
The tutorial approach is correct. See this example that use an undecorated JButton
to evoke the actual editor. Instead of PopupDialog
, you'll use JFileChooser
.
Addendum: To apply the editor to any cell(s) individually, override prepareEditor()
for the desired row and column, as discussed here.
-
Thanks for your tips. Can you also check this question please: http://stackoverflow.com/questions/11041575/using-all-jcombobox-jtextfield-jfilechooser-as-table-editor-overrides-the-re – C graphics Jun 14 '12 at 23:46