import javax.swing.*; // program uses class Scanner

public class BPIH4E11C
{
// main method begins execution of Java application
public static void main( String args[] )
{ 
//die throw counting	             
int die=1;
boolean b=true;
int one=0,two=0,three=0,four=0,five=0,six=0;
while(b)
{ 
die=Integer.parseInt(JOptionPane.showInputDialog("Enter number in die :")); // read grade
switch(die)
{
case 1:
one++;
break;
case 2:
two++;
break;
case 3:
three++;
break;
case 4:
four++;
break;
case 5:
five++;
break;
case 6:
six++;
break;
default:
b=false;
break;
} // end of switch-case
}//end of while
String s="Total of each die face : \n";
s+="1 : "+one+"\n";
s+="2 : "+two+"\n";
s+="3 : "+three+"\n";
s+="4 : "+four+"\n";
s+="5 : "+five+"\n";
s+="6 : "+six+"\n";
JOptionPane.showMessageDialog(null,s,"Total number of each die face",JOptionPane.PLAIN_MESSAGE); //display x and y
     } // end method main
} // end class BPIH4E11C
