我想在java中顯示消息對話框。此時我只能通過使用System.out.println()
方法顯示在控制檯的消息如何在java中顯示消息對話框
實施例:
public class demo{
public static void main(String[] x){
// i want to display the below message in a dialog box
System.out.print("java is fun");
}
}
'JOptionPane.showMessageDialog(null,「hi」);' –
謝謝Pavneet,我的工作 –
[Popup Message boxes]可能重複(http://stackoverflow.com/questions/7080205/popup-message-boxes) –