Re: automatically maximize JTable?
- From: usenet@xxxxxxx (Christian Kaufhold)
- Date: Mon, 27 Jun 2005 21:16:44 +0000 (UTC)
matomira@xxxxxxx wrote:
> I see questions everywhere on the web about how to fit a JTable to take
> all available space, but no adequate answer.
Then ask more specifically (code!). I cannot even determine whether your
problem is width or height.
> A JList with JScrollPanel in the same place has no problem resizing
> properly.
JTable JList (VERTICAL)
---------------------------------------------------------------------------------------------------------
minimum width sum of columns' /
preferred width sum of columns' | fixed, or maximum of renderers' preferred width
maximum width sum of columns' \
minimum/preferred/ \ sum of row heights rowCount * fixed height, or sum of renderer's
maximum width / preferred heights
preferredScrollable- explicitly set = preferred width
Viewport width (default: 450)
underflows width iff AUTO_RESIZE_OFF false
shrinks width to viewport unless AUTO_RESIZE_OFF false
preferredScrollable- explicitly set visibleRowCount (default: 8) [1]
Viewport height (default: 400) * (fixed cell size, or first cell's size)
underflows height true[2] false
shrinks height to viewport false false
[1] even probably wrongly implemented (if only one of fixedCellWidth/Height
is set, it is ignored).
[2] this has no effect on layout, only on whether the area below the cells
is filled by JTable background or JViewport background color.
Christian
--
And in short, I was afraid.
.
- Follow-Ups:
- Re: automatically maximize JTable?
- From: matomira
- Re: automatically maximize JTable?
- References:
- automatically maximize JTable?
- From: matomira
- Re: automatically maximize JTable?
- From: Christian Kaufhold
- Re: automatically maximize JTable?
- From: matomira
- automatically maximize JTable?
- Prev by Date: Re: GridBagLayout - How grow my columns correctly?
- Next by Date: Re: Synth XML file placement
- Previous by thread: Re: automatically maximize JTable?
- Next by thread: Re: automatically maximize JTable?
- Index(es):