Re: GridBag Expansion OS X - PLEASE HELP!!!

Discussion in 'Java' started by Loki, Jun 29, 2003.

  1. Loki

    Loki Guest

    Randomn is preciesly what it sounds like.

    I am only 16 an having worked with java for the few years that I have my
    understanding is rather lax. However, I have seen this problem happen
    with a program like the following example

    class fred
    {
    public static void main(String[] args)
    {
    Frame eric = new Frame("I'm eric");
    GridBagLayout GBL = new GridBagLayout();
    GridBagConstraints GBC = new GridBagConstraints();
    eric.setLayout(GBL);

    /*
    * Frame, gridbag simple
    */

    List list = new List();

    /*
    * List smpl
    */

    GBC.gridx = 0;
    GBC.gridy = 0;
    GBC.gridwidth = 1;
    GBC.gridheight = 1;
    eric.add(list, GBC);

    /*
    * Simplest GridBagConstraints implementation
    */

    eric.pack();
    eric.show();
    }
    }

    As you can see that is a very simple application and it has been known
    to "Randomly" do such things

    Suggestions????

    Thanx

    Loki

    \0/ - Eureka
    0 |
    /|\ / \
    / \
    Loki, Jun 29, 2003
    #1
    1. Advertising

  2. Loki

    rbs Guest

    In article <>, Loki <>
    wrote:

    > Suggestions????


    Honestly?

    Write your own layout manager.

    I needed something with GridBagLayout's power but got so
    frustrated with the seemingly random behavior of GBL itself
    that I ended (a) using Google to search for a layout manager
    that would accomplish what I wanted, (b) finding one that was
    close but not quite what I needed, and then (c) eventually
    using the "close" one as a model for writing my own.

    Now if something odd happens in the layout I either know exactly
    why or else can figure it out in less than 5 minutes.
    rbs, Jun 30, 2003
    #2
    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. Loki
    Replies:
    1
    Views:
    707
    Thomas G. Marshall
    Jun 29, 2003
  2. KK
    Replies:
    2
    Views:
    496
    Big Brian
    Oct 14, 2003
  3. nukleus
    Replies:
    2
    Views:
    359
    nukleus
    Jan 31, 2007
  4. qq2005
    Replies:
    0
    Views:
    341
    qq2005
    Feb 27, 2008
  5. asit

    gridbag layout

    asit, Jul 17, 2009, in forum: Java
    Replies:
    4
    Views:
    432
    Roedy Green
    Jul 23, 2009
Loading...

Share This Page