I am getting a string to int conversion error. I have tried to seek answers here: How to convert a String to an int in Java? But i could not solve the issue. My code is as follows:
import javax.swing.JOptionPane;
public class CarlysEventPrice
{
    public static void main(String[] args)
    {
    int total_Guests, total_Price, price_Per_Guest;
    total_Guests = JOptionPane.showInputDialog(null, "Please input the number of guests");
    int total_Guests = Integer.parseInt(total_Guests);
    total_Price = price_Per_Guest * total_Guests;
    JOptionPane.showMessageDialog(null,
                                  "************************************************\n" +
                                  "* Carly's makes the food that makes it a party *\n" +
                                  "************************************************\n");
    JOptionPane.showMessageDialog(null,
                                  "The total guests are " +total_Guests+ "\n" +
                                  "The price per guest is " +price_Per_Guest+ "\n" +
                                  "The total price is " +total_Price);
    boolean large_Event = (total_Guests >= 50);
    JOptionPane.showMessageDialog(null,
                                  "Is this job classified as a large event: " +large_Event);      
    }
}
my code is showing this error:
CarlysEventPrice.java:10: error: incompatible types: String cannot be converted to int
      total_Guests = JOptionPane.showInputDialog(null, "Please input the number of guests");
                                                ^
CarlysEventPrice.java:11: error: variable total_Guests is already defined in method main(String[])
        int total_Guests = Integer.parseInt(total_Guests);
            ^
CarlysEventPrice.java:11: error: incompatible types: int cannot be converted to String
        int total_Guests = Integer.parseInt(total_Guests);
                                            ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
I am using jGrasp for programming, and i also tried it to compile using cmd but it gave the same error. Thank you for helping.
 
     
     
    