private boolean containsValidInteger(JTextField field) {
        String content = field.getText();

        try {
            int value = Integer.parseInt(content);
            return value > 0;
        } catch (NumberFormatException ex) {
            return false;
        }
    }