I want to make the width of columns in JTable according to the width of biggest cell. But for this I think I need to read almost all the record set. It will definately slow down the processing speed so its not looking me a good solution.
Another solution that I am thinking is to extend the length of heading titles (array of field names) by filling it with space, accroding to database schema and then adjust the the column width according to these headers. But in some cases column width may be unnecessarialy wide.
I would like to know your opinion to get a better solution.
Its very easy to just display data in JTAble, no need to go beyond the requirements and ofcourse if I'll use Swing in future then I'll use IDE.
This time my JTable shows Field Names and an extra column Serial Number. All columns have equal width, as default. Table displays all screen wide. I didn't apply any TableModel or any other option. Do you think its enough because it fulfills the requirement "Result must be in JTable".
Or What formatting do you think I should apply. There are 100 Marks for General Consideration.
My JTable was pretty straightforward: columns distributed evenly, used custom table model, single selection, auto resize of all columns and that's it. I think decisions concerning the JTable don't affect the general considerations score section, rather the gui one.