private void selectInterface(){
        //save IP and mask current interface
        if(!Interface.equals("")){
            if(IPAddress!=null && SubnetMask!=null) 
           	    ((NetworkLayerDevice)Sim.getNode(NodeName)).setTCPIPSettings(Interface, IPAddress, SubnetMask);
                
        }
                       
            //read IP and mask for selected interface
		txtIpAddress.setEnabled(true);
		Interface = (String)cmbInterface.getSelectedItem();
		
		if(Interface != null){
			try {				
				IPAddress = ((NetworkLayerDevice)Sim.getNode(NodeName)).getIPAddress(Interface);
				
				if(IPAddress != null){
					txtIpAddress.setText(IPAddress);
					SubnetMask =((core.NetworkLayerDevice)Sim.getNode(NodeName)).getSubnetMask(Interface);
                                        txtSubnetMask.setText(SubnetMask);
                                        txtSubnetMask.setEnabled(true);

				}else{
					txtIpAddress.setText("Enter IP Address");
					txtSubnetMask.setText("Enter Subnet Mask");
					txtSubnetMask.setEnabled(false);
				}
				
			} catch (Exception e) {
				e.printStackTrace();
			}	
		}						
	}