Making JTable column widths obey me

  • Thread starter Daniel Luis dos Santos
  • Start date
D

Daniel Luis dos Santos

I just can't make the setPreferredWidth method of TableColumn work as I
want to. Is there a way ?

Also, is it possible to make the column not resizable even if the whole
table is resized ?
 
E

Eric Sosman

I just can't make the setPreferredWidth method of TableColumn work as I
want to. Is there a way ?

Probably, unless what you want is something unreasonable.
What do you want (and what have you tried)? Show us some code?
Also, is it possible to make the column not resizable even if the whole
table is resized ?

I don't know. I'd ponder for a l-o-n-g time, though, before
deciding that my own ideas about good-looking layout should override
the wishes of the person actually looking at the screen. (Consider:
The person at the screen may have vision problems, and may have
expanded the fonts to some ENORMOUS size so he can read them more
easily. Unfortunately, your fixed-width column is now too narrow to
display one entire capital W ...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top