Article View: borland.public.jbuilder.java.swing
Article #9438Re: Making a JTable Expandable
From: Paul Furbacher [TeamB]
Date: Sat, 18 Mar 2000 00:00
Date: Sat, 18 Mar 2000 00:00
29 lines
1857 bytes
1857 bytes
Jim Wolfe wrote: > > How can I make a JTable bigger (using a mouse) while it is contained inside > a JScrollPane, which in turn is inside a JFrame? Can this be done using the > visual designer? Not sure what you mean by making the table bigger. The resizing of that is done by its container, the scroll pane. There is no access to the table's size using the mouse. And in the Properties Inspector, don't touch the size settings for the table. You should only be concerned about the size of the scroll pane, not the size of the views it contains. Use the Designer to set the preferred and minimum sizes of the scroll pane, NOT the table. I often set the min and pref sizes to the same dimensions. It sounds as though you are thinking in terms of XYLayout, and you should quickly cure yourself of that. Use the XYLayout to get your components in the positions and of the sizes that you want, but switch to the GridBagLayout, and finish off making your layout aesthetically pleasing. Use the preferred and minimum size settings judiciously in this regard. No mouse dragging of size handles! (Yes, that's counter to the idea of having a visual designer, but the keyboard is still important here.) Paul Furbacher (TeamB)
Technical Details
Message-ID:
<38D3F7EF.8A41D27C@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8arbl0$1p18@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,228f7895fe19950 X-Google-Attributes: gid111d45,public From: "Paul Furbacher [TeamB]" <pnf@home.com> Subject: Re: Making a JTable Expandable Date: 2000/03/18 Message-ID: <38D3F7EF.8A41D27C@home.com> X-Deja-AN: 599312422 Content-Transfer-Encoding: 7bit References: <8arbl0$1p18@bornews.borland.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: pnf@home.com Newsgroups: borland.public.jbuilder.java.swing