private void handleDelete() {
		String ipString = ipText.getText().trim();
		String domString = nameText.getText().trim();

		if (!ipString.isEmpty() && !domString.isEmpty()) {
			Integer ip = DNSDB.stringToIP(ipText.getText());

			if (dnsDB.delete(domString, ip)) {
				JOptionPane.showMessageDialog(GUI.this, "'" + ipText.getText()
						+ "' - '" + nameText.getText() + "' has been deleted.");
			} else {
				JOptionPane.showMessageDialog(
						GUI.this,
						"deleting '" + ipText.getText() + "' - '"
								+ nameText.getText() + "' failed.");
			}

		} else if (!ipString.isEmpty()) {
			Integer ip = DNSDB.stringToIP(ipText.getText());
			String domain = dnsDB.findHostName(ip);

			if (domain == null) {
				JOptionPane.showMessageDialog(GUI.this,
						" no domain associated with the IP");
			} else {

				if (dnsDB.delete(domain, ip)) {
					JOptionPane.showMessageDialog(
							GUI.this,
							"'" + ipText.getText() + "' - '"
									+ nameText.getText()
									+ "' has been deleted.");
				} else {
					JOptionPane.showMessageDialog(GUI.this, "deleting '"
							+ ipText.getText() + "' - '" + nameText.getText()
							+ "' failed.");
				}
			}
		} else if (!domString.isEmpty()) {
			Integer ip = dnsDB.findIP(domString);

			if (ip == null) {
				JOptionPane.showMessageDialog(GUI.this,
						" no IP associated with the domain");
			} else {

				if (dnsDB.delete(domString, ip)) {
					JOptionPane.showMessageDialog(
							GUI.this,
							"'" + ipText.getText() + "' - '"
									+ nameText.getText()
									+ "' has been deleted.");
				} else {
					JOptionPane.showMessageDialog(GUI.this, "deleting '"
							+ ipText.getText() + "' - '" + nameText.getText()
							+ "' failed.");
				}
			}
		}
	}