When I enter done that doesn't work and it won't put the what I say that my title is for when it says please enter the relase year for? I don't know if my variables are initialized correctly?

// variables local to main
        String title = "";
        int releaseYear = 0;
        String artist = "";
        double length = 0;
        String genre = "";

// Sentinel- controlled while loop

        JOptionPane.showInputDialog(null, "Please enter a song title: " + Song.SENTINEL + " to quit:");
        while (!(title.equals(Song.SENTINEL))) {
            do {
                Integer.parseInt(JOptionPane.showInputDialog(null, "Please enter the release year for " + title));
            } while (releaseYear > 0);
            JOptionPane.showInputDialog(null, "Please enter the artist for " + title);
            do {
                Double.parseDouble(JOptionPane.showInputDialog(null, "Please enter the legth for " + title));
            } while (length > 0);
            JOptionPane.showInputDialog(null, "Please enter the genre for " + title);
JOptionPane.showInputDialog(null, "Please enter a song title: " + Song.SENTINEL + " to quit:");

should be

title = JOptionPane.showInputDialog(null, "Please enter a song title: " + Song.SENTINEL + " to quit:");

and similar methodologies can fix the rest...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.