The ultimate horror, source code. Uhm, for those people who program in Java on Linux, is there any reason that everything here wouldn't stack up nice and clear at least horizontally?

I've got:
button. button. button. button. button. button.
label.. two block TF... label.. two block TF...
two block TF... four block TextArea............
button. button. button. button. combobx label..

For some reason, the buttons on top in row 0 are all different widths, and everything below is apropriately messed up to follow. Am I goofing, or is this Linux specific? I don't have any other machine to test it on right this sec.

-Charles

public MacroInterface()
{
        setLayout(new GridBagLayout());
        GridBagConstraints g = new GridBagConstraints();
        g.gridx = 0;
        g.gridy = 0;
        g.gridwidth = 1;
        g.fill = GridBagConstraints.BOTH;
        g.weightx = 1;

        // row 0
        for (int i = 0; i < 5; i++)
        {
macroFunctionButton[i] = new Button();
            macroFunctionButton[i].setLabel("Function " + i);
            g.gridx = i;
            add(macroFunctionButton[i], g);
        }
        g.gridx = 5;
        add(macroStopButton, g);

        // row 1
        g.gridy = 1;
        g.gridx = 0;
        g.gridwidth = 1;
        add(macroPathButton, g);

        g.gridx = 1;
        g.gridwidth = 2;
        add(macroPathTF, g);

        g.gridwidth = 1;
        g.gridx = 3;
        add(macroMaskLabel, g);

        g.gridx = 4;
        g.gridwidth = 2;
        add(macroMaskTF, g);

        // row 2
        g.gridx = 0;
        g.gridy = 2;
        g.gridwidth = 2;
        add(macroFileList, g);

        g.gridx = 2;
        g.gridwidth = 4;
        add(macroEditTA, g);

        // row 3
        g.gridwidth = 1;
        g.gridy = 3;
        g.gridx = 0;
        add(macroExecuteButton, g);

        g.gridx = 1;
        add(macroEditButton, g);

        g.gridx = 2;
        add(macroRefreshButton, g);

        g.gridx = 3;
        add(macroSetButton, g);

        g.gridx = 4;
        add(macroSelectCB, g);

        g.gridx = 5;
        add(new Label(), g);
}

Reply via email to