grid or gridbaglayout

P

Passero

I know it is possible in gridBagLayout to place components in a table and
you can tell how many rows or columns the componont needs. Is that also
possible in the gridlayout or not? I also forgot how i can tell to my
component that it has to be a number of rows and columns.
 
D

dhek bhun kho

I know it is possible in gridBagLayout to place components in a table and
you can tell how many rows or columns the componont needs. Is that also
possible in the gridlayout or not? I also forgot how i can tell to my
component that it has to be a number of rows and columns.

It should be possible to do this, but it's really awkward to do. If you
are using a GridLayout all components in each cell will have the same size
as the rest. You can 'emulate' the same effect by nesting containers with
a GridLayout in each other. But this is really odd.

If you do to much of this nesting you can really burn your brains out (no
kidding). It's comparable as the guys who nest <table> within <table> with
<table> in HTML or suffering from a <frameset>-overdose. (Just hope you're
not maintaining the page, so you never have to modify it)

The GridBagLayout is a bit tricky at start. But Netbeans
(www.netbeans.org) has a great 'guru/wizard' that will do it for you. It
helps a lot to see how the code works.

Greets.
Bhun.
 
P

Passero

dhek bhun kho said:
It should be possible to do this, but it's really awkward to do. If you
are using a GridLayout all components in each cell will have the same size
as the rest. You can 'emulate' the same effect by nesting containers with
a GridLayout in each other. But this is really odd.

If you do to much of this nesting you can really burn your brains out (no
kidding). It's comparable as the guys who nest <table> within <table> with
<table> in HTML or suffering from a <frameset>-overdose. (Just hope you're
not maintaining the page, so you never have to modify it)

I know, i have seen such pages...
The GridBagLayout is a bit tricky at start. But Netbeans
(www.netbeans.org) has a great 'guru/wizard' that will do it for you. It
helps a lot to see how the code works.

The problem is that i hate wizards, i am studying java at school and i want
to write the code by myself that's why i don't want to use a wizard.
 
D

dhek bhun kho

Hi,

I know, i have seen such pages...

I used to make pages like that, because I could not find a good
solution for the silly pages I was making (I'm not sure whether it was
possible at all in the older HTML specs). If you're new to it, it's
probably easier to do a lot of nesting.
The problem is that i hate wizards, i am studying java at school and i want
to write the code by myself that's why i don't want to use a wizard.

Sure, but there's nothing wrong at seeing/tracing how the generated code
gets things working, is there?

Greets.
Bhun.
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top