private void initGUI(Object nodeArray[], int selectedIndex) {
		try {
			setSize(350, 225);
			{
				backpanel = new JPanel();
				backpanel.setMinimumSize(new Dimension(200, 10));
				this.getContentPane().add(backpanel, BorderLayout.CENTER);
				GridBagLayout backpanelLayout = new GridBagLayout();
				backpanel.setPreferredSize(new java.awt.Dimension(264, 213));
				backpanelLayout.columnWeights = new double[] {};
				backpanelLayout.columnWidths = new int[] {};
				backpanelLayout.rowWeights = new double[] {0.0};
				backpanelLayout.rowHeights = new int[] {5,5,5,5};
				backpanel.setLayout(backpanelLayout);
				{
					lblNodeName = new JLabel();
					backpanel.add(lblNodeName, new GridBagConstraints(
						0,
						0,
						1,
						1,
						0.0,
						1.0,
						GridBagConstraints.LINE_END,
						GridBagConstraints.HORIZONTAL,
						new Insets(0, 0, 0, 0),
						21,
						0));
					lblNodeName.setText("Node Name:");
				}
				{
					lblInterface = new JLabel();
					backpanel.add(lblInterface, new GridBagConstraints(
						0,
						1,
						1,
						1,
						0.0,
						1.0,
						GridBagConstraints.LINE_END,
						GridBagConstraints.HORIZONTAL,
						new Insets(0, 0, 0, 27),
						0,
						0));
					lblInterface.setText("Interface:");
				}
				{
					lblIPAddress = new JLabel();
					backpanel.add(lblIPAddress, new GridBagConstraints(
						0,
						2,
						1,
						1,
						0.0,
						1.0,
						GridBagConstraints.LINE_END,
						GridBagConstraints.HORIZONTAL,
						new Insets(0, 0, 0, 16),
						0,
						0));
					lblIPAddress.setText("IP Address:");
				}

				final JLabel lblSubnetMask = new JLabel();
				final GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();
				gridBagConstraints_2.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints_2.weighty = 1.0;
				gridBagConstraints_2.anchor = GridBagConstraints.LINE_END;
				gridBagConstraints_2.gridy = 3;
				gridBagConstraints_2.gridx = 0;
				backpanel.add(lblSubnetMask, gridBagConstraints_2);
				lblSubnetMask.setText("Subnet Mask:");

				cmbNodeName = new JComboBox(nodeArray);
				cmbNodeName.setMinimumSize(new Dimension(100, 0));
				cmbNodeName.setSelectedIndex(selectedIndex);
				cmbNodeName.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						selectNode();
					}
				});
				final GridBagConstraints gridBagConstraints = new GridBagConstraints();
				gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints.anchor = GridBagConstraints.LINE_START;
				gridBagConstraints.gridy = 0;
				gridBagConstraints.gridx = 1;
				backpanel.add(cmbNodeName, gridBagConstraints);

				cmbInterface = new JComboBox();
				cmbInterface.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						selectInterface();
					}
				});
				cmbInterface.setEnabled(false);
				final GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();
				gridBagConstraints_1.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints_1.anchor = GridBagConstraints.LINE_START;
				gridBagConstraints_1.gridy = 1;
				gridBagConstraints_1.gridx = 1;
				backpanel.add(cmbInterface, gridBagConstraints_1);

				txtIpAddress = new JTextField();
				txtIpAddress.addFocusListener(new FocusAdapter() {
					@Override
					public void focusLost(FocusEvent e) {
						ipAddressEntered();
					}
				});
				txtIpAddress.addKeyListener(new KeyAdapter() {
					@Override
					public void keyReleased(KeyEvent e) {
//						checkForDefaultSubnet();
					}
					@Override
					public void keyPressed(KeyEvent e) {
//						checkForDefaultSubnet();
					}
				});
				txtIpAddress.addMouseListener(new MouseAdapter() {
					@Override
					public void mouseClicked(MouseEvent e) {						
						txtIpAddress.selectAll();
					}
				});
				txtIpAddress.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						ipAddressEntered();
						
					}
				});
				txtIpAddress.setEnabled(false);
				final GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();
				gridBagConstraints_3.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints_3.anchor = GridBagConstraints.LINE_START;
				gridBagConstraints_3.gridy = 2;
				gridBagConstraints_3.gridx = 1;
				backpanel.add(txtIpAddress, gridBagConstraints_3);
				txtIpAddress.setText("Enter IP Address");

				txtSubnetMask = new JTextField();
				txtSubnetMask.setPreferredSize(new Dimension(140, 20));
				txtSubnetMask.setMinimumSize(new Dimension(0, 0));

				txtSubnetMask.addFocusListener(new FocusAdapter() {
					@Override
					public void focusLost(FocusEvent e) {
						subnetmask();
					}
				});
				txtSubnetMask.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						subnetmask();
					}
				});
				txtSubnetMask.addMouseListener(new MouseAdapter() {
					@Override
					public void mouseClicked(MouseEvent e) {
						txtSubnetMask.selectAll();
					}
				});
				txtSubnetMask.setEnabled(false);
				final GridBagConstraints gridBagConstraints_4 = new GridBagConstraints();
				gridBagConstraints_4.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints_4.anchor = GridBagConstraints.LINE_START;
				gridBagConstraints_4.gridy = 3;
				gridBagConstraints_4.gridx = 1;
				backpanel.add(txtSubnetMask, gridBagConstraints_4);
				txtSubnetMask.setText("Enter Subnet Mask");

				lblError = new JLabel();
				lblError.setHorizontalTextPosition(SwingConstants.CENTER);
				lblError.setHorizontalAlignment(SwingConstants.CENTER);
				lblError.setAlignmentX(Component.CENTER_ALIGNMENT);
				lblError.setMinimumSize(new Dimension(100, 20));
				lblError.setMaximumSize(new Dimension(100, 20));
				lblError.setPreferredSize(new Dimension(100, 20));
				lblError.setVisible(false);
				final GridBagConstraints gridBagConstraints_5 = new GridBagConstraints();
				gridBagConstraints_5.anchor = GridBagConstraints.WEST;
				gridBagConstraints_5.insets = new Insets(0, 1, 0, 0);
				gridBagConstraints_5.fill = GridBagConstraints.BOTH;
				gridBagConstraints_5.gridwidth = 2;
				gridBagConstraints_5.gridy = 5;
				gridBagConstraints_5.gridx = 0;
				backpanel.add(lblError, gridBagConstraints_5);
				lblError.setText("Error Message!!!! Error");

				txtDefaultGW = new JTextField();
				txtDefaultGW.addFocusListener(new FocusAdapter() {
					@Override
					public void focusLost(FocusEvent e) {
						setDefaultGW();
					}
				});
                                txtDefaultGW.addKeyListener(new KeyListener() {
                                        public void keyTyped(KeyEvent e) {}
                                        public void keyReleased(KeyEvent e) {}
                                        public void keyPressed(KeyEvent e) {
                                            int key = e.getKeyCode();
                                            if (key == KeyEvent.VK_ENTER) {
                                                setDefaultGW();                                                
                                            }
                                        }
				});
				txtDefaultGW.addMouseListener(new MouseAdapter() {
					@Override
					public void mouseClicked(MouseEvent e) {
						txtDefaultGW.selectAll();
					}
				});
				txtDefaultGW.setEnabled(false);
				final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();
				gridBagConstraints_6.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints_6.gridy = 4;
				gridBagConstraints_6.gridx = 1;
				backpanel.add(txtDefaultGW, gridBagConstraints_6);
				txtDefaultGW.setText("Enter Default Gateway");

				final JLabel lblDefaultGW = new JLabel();
				final GridBagConstraints gridBagConstraints_7 = new GridBagConstraints();
				gridBagConstraints_7.fill = GridBagConstraints.HORIZONTAL;
				gridBagConstraints_7.gridy = 4;
				gridBagConstraints_7.gridx = 0;
				backpanel.add(lblDefaultGW, gridBagConstraints_7);
				lblDefaultGW.setText("Default Gateway:  ");
				
                                
                                
				if(selectedIndex == 0){
					selectNode();							
				}
				
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}