File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
campus Graphics
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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

 
Darryl Burke
Bartender
Posts: 5116
11
Java Netbeans IDE Opera
 
campus Graphics
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ok, thanks.
I want to remove my port here, dont know how to.
 
Shtilmark Pollo
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • 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.


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic