Did you specify explicitly the width of the columns of the JTable or did you use the equal width for each column?
I've noticed that if I set the column widths and hit 'search' button (which calls controler and sets new model for the view) it resets the column widths... One possible way is to execute my own 'setColumnWidths' method after each search button click event but I don't really like this idea.
Also, if user changes the column widths as he likes and hits 'search' button it will return to uniformly distributed columns (without executing setColumnWidths) or revert to my own columns width (when executing setColumnWidths). I don't like any of those as it seems to ignore what the user defined...
Because the question is strictly related to the SCJD assignment and it is more about:
- user (Assesor) experience,
- how other Users did implement their solution,
- did they have the same problem,
- did they bother about it.
- how to do it.
Thanks for the concern :-)
posted 9 years ago
The people who actually use Swing and know the answer to the question read the Swing forum. There is a simple explanation and solution to the problem.