I have Jdialog where ihave to add following components alike this
--------------------------
----------
----------
----------
----------
----------
-|
Label1 Combobox1
Label2 TextBox1
OkBtn CancleBtn
--------------------------
----------
----------
----------
----------
----------
-|
I tried but not get expected result.I need assistance for it...Thanks
GridBagLayout TgridBag = new GridBagLayout();
Tpanel.setLayout(TgridBag)
;
I_MPNPoolNameCombo = new JComboBox();
Tpanel.add(new JLabel("Select the pool name:"),
new GridBagConstraints(0, 2, 1, 1, 1.0, 1.0,
GridBagConstraints.EAST,
GridBagConstraints.NONE,
new Insets(0, 5, 5, 0), 0, 0));
Tpanel.add(I_MPNPoolNameCo
mbo, new GridBagConstraints(1, 2, 1, 1, 1.0, 1.0,
GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(0, 5, 5, 5), 0, 0));
I_staticIpAddressTextField
= new JTextField(10);
queryModes();
Tpanel.add(new JLabel("Static IP address(Optional):"),
new GridBagConstraints(0, 4, 1, 1, 1.0, 1.0,
GridBagConstraints.EAST,
GridBagConstraints.NONE,
new Insets(0, 5, 5, 0), 0, 0));
Tpanel.add(I_staticIpAddre
ssTextFiel
d, new GridBagConstraints(1, 4, 1, 1, 1.0, 1.0,
GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(0, 5, 5, 5), 0, 0));
Start Free Trial