gpt4 book ai didi

java - 如何获取事件单击“确定”对话框

转载 作者:行者123 更新时间:2023-12-01 20:14:47 25 4
gpt4 key购买 nike

我有显示对话框

JOptionPane.showMessageDialog(frame, "Eggs are not supposed to be green.");

enter image description here

点击“确定”按钮时如何获取事件?

最佳答案

代码将被阻止,直到您点击

    System.out.println("before click");
JOptionPane.showMessageDialog(null, "Eggs are not supposed to be green.");
System.out.println("after click - do your code here");

关于java - 如何获取事件单击“确定”对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46108687/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com