Please help me on my project. There's a logic error


#1

There's no syntax error on my codes but when the joption pane dialog box appeared. When we type for example when we input "1" it should appear the quantity and the total prices. Instead of appearing in the joption pane it wil only appear when we type it on in the output box. Please help me.

ps: sorry for my english

import javax.swing.*;
import java.util.*;

public class JuanFaustFood
{

public double subTotal2;
public static double runningTotal;
private static double itemPrice;
static boolean ordering = true;

static Scanner input = new Scanner(System.in);
public static void menu(){
JOptionPane.showMessageDialog(null,"Welcome to JUAN FAUSTFOOD");
JOptionPane.showMessageDialog(null,"May i have your order?");
JOptionPane.showInputDialog(null,"\n1. Burger ($2.00) \n2. Fries ($1.50)\n3. Soda ($1.00) \n4. Done");
}
public static double itemPrice(int foodItem) {
if (foodItem == 1) {

   JOptionPane.showMessageDialog(null,"You've ordered a burger");
    itemPrice = 2.00;
}
if (foodItem == 2) {

     JOptionPane.showMessageDialog(null,"You've ordered fries");
    itemPrice = 1.50;
}
if (foodItem == 3) {

     JOptionPane.showMessageDialog(null,"You've ordered a soda");
    itemPrice = 1.00;
}
quantity();
return itemPrice;

}
public static double quantity()
{
JOptionPane.showInputDialog(null,"Enter quantity");
double quantity = input.nextDouble();
subTotal(quantity, itemPrice);
return quantity;
}
public static double subTotal(double quantity, double itemPrice) {
double subTotal = quantity*itemPrice;
JOptionPane.showMessageDialog(null,"Subtotal: "+ subTotal);
runningTotal += subTotal;
return subTotal;
}
public static void done(){
ordering = false;
JOptionPane.showMessageDialog(null,runningTotal);
JOptionPane.showMessageDialog(null,"Enjoy your meal");
}
public static void main(String[] args)
{
int menuOption ;
int foodItem ;
input = new Scanner(System.in);
do{
double runningTotal;
menu();
menuOption = input.nextInt();

    switch(menuOption){
        case 1:
            foodItem = 1;
            itemPrice(foodItem);
            break;
        case 2:
            foodItem = 2;
            itemPrice(foodItem);
            break;
        case 3:
            foodItem = 3;
            itemPrice(foodItem);
            break;
        case 4:
            done();
            break;      
        default:
             JOptionPane.showMessageDialog(null,"Invalid option.");
    }

} while(ordering); {

}
}
}