如何在不使用数组的情况下更改showConfirmDialog中的文本?

时间:2018-06-09 17:44:07

标签: java swing user-interface joptionpane

我正在完成我的任务,其中一个需要一个确认对话框来检查人是单身还是已婚。但问题是我不允许使用数组。我搜索了其他答案,但都使用了数组。

如何在不使用数组的情况下更改showConfirmDialog中的文本?

1 个答案:

答案 0 :(得分:1)

JOptionPane.showConfirmDialog(parent,message)。例如。

#include <iostream>
#include "instantiate.h"
using namespace std;

int main() {
    cout << "Good day commander!\n";
}