Re: GridBagLayout not behaving as specified



"naveen" <saikumarbt@xxxxxxxxx> wrote in message news:1176901472.093399.162570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[snip]

In the Button setting "dbButton" make " gbc.ipadx = 20;"
It will work...!! :)

So you mean:

gbc.gridx = 15;
gbc.gridy = 1;
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
gbc.weightx = 0.0;
gbc.weighty = 0.0;
gbc.insets = new Insets(0, 4, 18, 8);
gbc.ipadx = 20;
panel.add(dbButton, gbc);

Hmm, it doesn't work on machine (unless I am completely misunderstanding your suggestion). In fact it makes it worse because the button is now wider than before and is still the same width as the password field. By my understanding the button should be 4 times _narrower_ than the password field because it has a grid width of 1 and the password field has a grid width of 4. What gives?

--
And loving it,

-Q
_________________________________________________
Qu0llSixFour@xxxxxxxxx
(Replace the "SixFour" with numbers to email me)

.


Quantcast