🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: aus.computers.java
5 messages
5 total messages Started by Thomas F Wed, 13 Oct 1999 00:00
[Converting gridbag layout to frame layout application]
#1035
Author: Thomas F
Date: Wed, 13 Oct 1999 00:00
19 lines
1125 bytes
Hi ,

I have just developed a gridbag layout for an email application, and
would like to transport that to a frame application - 

I have tried the following with no success 

Frame f;
GridBagLayou gbLayout;

f = new Frame("FrameMail 1.40"); 
f.setLayout(gbLayout); 

f.add(c);

where c is the individual components added to the gridbag at each
interval.

Any ideas would be greatly appericated. 
Re: [Converting gridbag layout to frame layout application]
#1036
Author: Tavis Elliott
Date: Wed, 13 Oct 1999 00:00
30 lines
1333 bytes
For JFrames, you need to add Components to its ContentPane, and not to
the JFrame itself.

Try:

f.getContentPane().add( ... );

Tavis

Thomas F wrote:

> Hi ,
>
> I have just developed a gridbag layout for an email application, and
> would like to transport that to a frame application -
>
> I have tried the following with no success
>
> Frame f;
> GridBagLayou gbLayout;
>
> f = new Frame("FrameMail 1.40");
> f.setLayout(gbLayout);
>
> f.add(c);
>
> where c is the individual components added to the gridbag at each
> interval.
>
> Any ideas would be greatly appericated.
Re: [Converting gridbag layout to frame layout application]
#1037
Author: Thomas F
Date: Wed, 13 Oct 1999 00:00
43 lines
1679 bytes
Thanks ... I will give that a try, but from memory, JFrame is part of
Swing? 

I am not allowed to use Swing .... as part of the assignment
requirements.

Thankx


On Wed, 13 Oct 1999 11:43:11 -0700, Tavis Elliott <tavise@evergo.net>
wrote:

>For JFrames, you need to add Components to its ContentPane, and not to
>the JFrame itself.
>
>Try:
>
>f.getContentPane().add( ... );
>
>Tavis
>
>Thomas F wrote:
>
>> Hi ,
>>
>> I have just developed a gridbag layout for an email application, and
>> would like to transport that to a frame application -
>>
>> I have tried the following with no success
>>
>> Frame f;
>> GridBagLayou gbLayout;
>>
>> f = new Frame("FrameMail 1.40");
>> f.setLayout(gbLayout);
>>
>> f.add(c);
>>
>> where c is the individual components added to the gridbag at each
>> interval.
>>
>> Any ideas would be greatly appericated.
>
Re: [Converting gridbag layout to frame layout application]
#1038
Author: William Adcock
Date: Wed, 13 Oct 1999 00:00
24 lines
1358 bytes
change "GridBagLayou gbLayout;" to "GridBagLayout gbLayout = new
GridBagLayout(...)". Right now gbLayout is a null pointer.

Thomas F wrote:

> Hi ,
>
> I have just developed a gridbag layout for an email application, and
> would like to transport that to a frame application -
>
> I have tried the following with no success
>
> Frame f;
> GridBagLayou gbLayout;
>
> f = new Frame("FrameMail 1.40");
> f.setLayout(gbLayout);
>
> f.add(c);
>
> where c is the individual components added to the gridbag at each
> interval.
>
> Any ideas would be greatly appericated.
Re: [Converting gridbag layout to frame layout application]
#1039
Author: DAVID ROBERTSON
Date: Thu, 14 Oct 1999 00:00
14 lines
1045 bytes
On Wed, 13 Oct 1999, Thomas F wrote:

> Frame f;
> GridBagLayou gbLayout;
> 
> f = new Frame("FrameMail 1.40"); 
> f.setLayout(gbLayout); 
> 
> f.add(c);
> 

I dunno whether you just didn't type it or not, but above you've
forgotten to construct the GridBagLayout after you declared it.  If
so, you'll end up with a nullPointerException.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads