showMessageDialog没有这个功能,自己定义下才行 JDialog jDialog =new JDialog();jDialog.add(new JLabel("test"));jDialog.setSize(300, 100);jDialog.setLocationRelativeTo(null);jDialog.setVisible(true);try { Thread.sleep(3000);} catch (InterruptedException e) { e.printStackTrace();...