我正在尝试一些代码,但我得到了 NullPointerException。代码片段如下:
String dialogmessage = "Welcome - " +user;
int dialogtype = JOptionPane.PLAIN_MESSAGE;
dialogtype = JOptionPane.INFORMATION_MESSAGE;
String dialogs = null;
JOptionPane.showMessageDialog((Component)null, dialogmessage, dialogs, dialogtype);
usrname.setText("");
pswrd.setText("");
frame.setVisible(false);
请帮帮我