The operator + is undefined for the argument type(s) String
importjava.awt.*;importjavax.swing.*;publicclassMyWindowextendsJFrame{publicMyWindow(...
import java.awt.*;
import javax.swing.*;
public class MyWindow extends JFrame
{
public MyWindow(String title)
{
super(title);
setSize(300,300);
setLocation(30,50);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args, JFrame newFrame)
{
new MyWindow(JOptionPane.showMessageDialog(newFrame.getContentPane(), +
"Error! Please try again!" +
"Error", +
JOptionPane.ERROR_MESSAGE));
}
}
求解肿么破,不能用加号合并行吗 展开
import javax.swing.*;
public class MyWindow extends JFrame
{
public MyWindow(String title)
{
super(title);
setSize(300,300);
setLocation(30,50);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args, JFrame newFrame)
{
new MyWindow(JOptionPane.showMessageDialog(newFrame.getContentPane(), +
"Error! Please try again!" +
"Error", +
JOptionPane.ERROR_MESSAGE));
}
}
求解肿么破,不能用加号合并行吗 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询