JOptionPane组件放置

问题描述

我有一个看起来像这样的JOptionPane对话框。

enter image description here

我希望复选框位于这样的图标正下方。

enter image description here

使用JOptionPane是否可能,还是必须创建自己的对话框?

这是第一张图片的代码。

public static void main(String[] args) {

    Box box = Box.createVerticalBox();
    box.add(new JLabel("TEXT"));
    box.add(new JCheckBox("Check box text"));

    int result = JOptionPane.showConfirmDialog(null,box,"TITLE",JOptionPane.YES_NO_OPTION);
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)