grid or gridbaglayout

Discussion in 'Java' started by Passero, Jul 2, 2003.

  1. Passero

    Passero Guest

    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.
     
    Passero, Jul 2, 2003
    #1
    1. Advertising

  2. "Passero" <>, Wed, 02 Jul 2003 18:46:13 +0000:

    > 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.
     
    dhek bhun kho, Jul 2, 2003
    #2
    1. Advertising

  3. Passero

    Passero Guest

    "dhek bhun kho" <> schreef in bericht
    news:p...
    > 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.

    > Greets.
    > Bhun.
    >
     
    Passero, Jul 2, 2003
    #3
  4. Hi,

    "Passero" <>, Wed, 02 Jul 2003 21:10:08 +0000:
    > "dhek bhun kho" <> schreef in bericht
    > news:p...
    >> 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...


    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 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.


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

    Greets.
    Bhun.
     
    dhek bhun kho, Jul 2, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. me
    Replies:
    2
    Views:
    4,530
    Sudsy
    Jul 21, 2003
  2. David McCallum

    GridBagLayout Example

    David McCallum, Oct 23, 2003, in forum: Java
    Replies:
    0
    Views:
    696
    David McCallum
    Oct 23, 2003
  3. John Davison

    Viewing GridBagLayout's Grid Lines?

    John Davison, Dec 9, 2003, in forum: Java
    Replies:
    6
    Views:
    4,433
    Todd Corley
    Dec 10, 2003
  4. AJ
    Replies:
    6
    Views:
    722
  5. KingKongBundy

    Using GridBagLayout with JFrame

    KingKongBundy, Aug 24, 2004, in forum: Java
    Replies:
    7
    Views:
    5,577
    KingKongBundy
    Aug 25, 2004
Loading...

Share This Page