how would i display a yes/no dialog that would return one value if the user clicks yes and another value if they click no. I know you can do it using some part of JOptionPane but im not sure what

Try to post things when you figure them out so that other people can see them. Not a big deal, just saying.

final JOptionPane optionPane = new JOptionPane(
    "Yes or no?",