private void handleAction() {
	if(actionButton.getText().equals("Find IP")){
	    Integer ip = dnsDB.findIP(nameText.getText());
	    if(ip == null){
		JOptionPane.showMessageDialog(GUI.this, "Could not find an IP address with host name: " + nameText.getText());
	    } else{
		ipText.setText(DNSDB.IPToString(ip));
	    }
	} else if(actionButton.getText().equals("Find Host Name")){
	    Integer ip = DNSDB.stringToIP(ipText.getText());
	    if(ip == null){
		JOptionPane.showMessageDialog(GUI.this, "'" + ipText.getText() + "' is not a valid IP address.");
	    } else{
		String name = dnsDB.findHostName(ip);
		if(name == null){
		    JOptionPane.showMessageDialog(GUI.this, "Could not find a host name with IP address: " + ipText.getText());
		} else{
		    nameText.setText(name);
		}
	    }
	} else if(actionButton.getText().equals("Test Name-IP Pair")){
	    Integer ip = DNSDB.stringToIP(ipText.getText());
	    if(ip == null){
		JOptionPane.showMessageDialog(GUI.this, "'" + ipText.getText() + "' is not a valid IP address.");
	    } else{
		boolean valid = dnsDB.testPair(ip, nameText.getText());
		if(valid){
		    JOptionPane.showMessageDialog(GUI.this, "'" + ipText.getText() + "' is correctly mapped to '" + nameText.getText() + "'.");
		} else{
		    JOptionPane.showMessageDialog(GUI.this, "'" + ipText.getText() + "' is not the IP address for '" + nameText.getText() + "'.");
		}
	    }
	}
    }