public static String newValue()
    {
        JOptionPane jp = new JOptionPane("Input");
        String value = jp.showInputDialog(null, "Enter value (Type #D (Decimal), #B (Binary), #O (Octal), followed by a value.\n\tDefault base is Hex.");

        // If the user does not enter anything, returns "ERROR". 
        if (value == null) {
            return "NULL";
        } else if (value.length() == 0) {
            return "ERROR";
        }

        try {
            if (value.indexOf("#") == -1) {
                 value = neg(16, value);
            } else {
                if (value.substring(1, 2).equalsIgnoreCase("B")) {
                    value = neg(2, value.substring(2));
                } else if (value.substring(1, 2).equalsIgnoreCase("D")) { 
                    value = neg(10, value.substring(2));
                } else if (value.substring(1, 2).equalsIgnoreCase("O")) {
                    value = neg(8, value.substring(2));
                } else {
                    throw new NumberFormatException();
                }
            }
        } catch (NumberFormatException nfe) {
        }
        return value;
    }