Advertisement

07.24.2008 at 07:43AM PDT, ID: 23592260
[x]
Attachment Details

Need Assistance for setiing GridBagConstraints

Asked by ANISHKA1 in Java Programming Language

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_MPNPoolNameCombo, 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_staticIpAddressTextField, 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
 
Loading Advertisement...
 
[+][-]07.24.2008 at 09:48AM PDT, ID: 22081139

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Sign Up Now!
Solution Provided By: SprudeVI
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.24.2008 at 01:08PM PDT, ID: 22083013

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628