• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

(jComboBox, JTextField, jFileChooser) as table editor overrides the refrences

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the code below ( complete code is provided), for multiple rows of same table column, I am trying to set an Editable comboBox as editor for first row ( so that the user can select from the available choices or type its own), a filechooser for second row and the default textFiled for the rest of rows.

The Problem: and steps to reproduce it:

1- Run the code, 2- click on second row and choose a folder (the row turns yellow) 3- now click on first row to select the type of movie (just click , no need to type anything or to choose) 4- now make another click back on second row(Folder selection)

you will see the contents of this row will be copied to first row?!

I know there are many things that I did not do right, perhaps handling swings which are not thread safe, handling references and so on. I was wondering if you guys can help me to fix this bug and turn this code to something solid.



also here is the code for EditableTableModel.java

 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites
http://stackoverflow.com/questions/11041575/using-all-jcombobox-jtextfield-jfilechooser-as-table-editor-overrides-the-re
 
campus Graphics
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:Please BeForthrightWhenCrossPostingToOtherSites
http://stackoverflow.com/questions/11041575/using-all-jcombobox-jtextfield-jfilechooser-as-table-editor-overrides-the-re


ok, thanks.
I want to remove my port here, dont know how to.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A long time ago i did something like that. There, i a little bit adopting my code to your code.


reply
    Bookmark Topic Watch Topic
  • New Topic