Article View: borland.public.jbuilder.java.swing
Article #8564Re: Help with JFrame
From: John P. McGrath
Date: Tue, 08 Aug 2000 00:00
Date: Tue, 08 Aug 2000 00:00
30 lines
1558 bytes
1558 bytes
On Mon, 7 Aug 2000 15:42:42 -0400, Alexis Rios wrote: > I'm displaying a secon JFrame from the main frame and > i don't know why..for some reason a JTable inside a > JScrollPane in that secondary frame is truncating > instead of enlarging to the right size, so all records > are not displayed properly. > > How can I resolve this or is better to use a JDialog? > What's the difference? Why I have to pack the frame > so it looks good? The job of a JScrollPane is to take a large component and allow you to see it in an smaller screen area. So what is the "right" size for the JScrollPane? If you know what the "right" size is, you can specify it by calling the JTable's setPreferredScrollableViewportSize() method. But otherwise, it has to guess at what size is "right". The use of JFrame or JDialog has nothing to do with this issue. A JDialog can be modal, whereas a JFrame cannot. A JDialog will be minimized along with its parent frame, whereas a JFrame will not. The decorations are different, and I am sure there are other differences as well. -- Regards, John McGrath
Technical Details
Message-ID:
<MPG.13f94c072f8aaa42989a9b@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<398f10a5_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9975bf1b4600697a X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: Help with JFrame Date: 2000/08/08 Message-ID: <MPG.13f94c072f8aaa42989a9b@forums.borland.com> X-Deja-AN: 655705088 References: <398f10a5_1@dnews> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing