How to present a simple alert message in java?

后端 未结 5 461
无人及你
无人及你 2020-12-07 11:00

Coming from .NET i am so used calling Alert() in desktop apps. However in this java desktop app, I just want to alert a message saying \"thank you for using java\" I have to

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 11:47

    Assuming you already have a JFrame to call this from:

    JOptionPane.showMessageDialog(frame, "thank you for using java");
    

    See The Java Tutorials: How to Make Dialogs
    See the JavaDoc

提交回复
热议问题