0
public static String GetName()
{
String Name;
String userName = "";
int GN = 0;
if(GN == 0)
{
userName =
JOptionPane.showInputDialog("What is you name?");
GN = 1;
}
Name = userName;
return Name;
}
public static void Welcome_P()
{
JDialog.setDefaultLookAndFeelDecorated(true);
Icon welcomeIcon = new ImageIcon("Welcome.gif");
JOptionPane.showMessageDialog(null, "\t \t▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇\n"
+ "\t \t▇▇Welcome " + GetName() + " to " + GetAuthorsName() + " Quirky Program▇▇\n"
+ "\t \t▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇\n", JOptionPane.INFORMATION_MESSAGE, "Welcome", welcomeIcon);
}
我不斷收到這條消息,我是新來編程我不明白我需要做什麼來解決這個問題。不兼容的類型:int不能轉換爲String。發生這種情況時,我把JOptionPane.Information_MessageJOptionPane信息消息
你的問題是? – gattsbr