1 int messageType=JOptionPane.INFORMATION_MESSAGE; 2 String message=mines + " minutes is approximately " + years + " years and " + days + " days"; 3 JOptionPane.showMessageDialog(null,message,"result",messageType );
String number; number=JOptionPane.showInputDialog(null,"输入初速度"); v0=Double.parseDouble(number);