Form hi = new Form("Dialog", BoxLayout.y());
Button b = new Button("Show Dialog");
hi.add(b);
b.addActionListener(e -> Dialog.show("Account Locked", "Maximum allowed invalid attempts exceeded. Please contact your bank to unlock or Re-register through the internet banking portal", "OK", null));
hi.show();
1 回答
您似乎以不同于默认设置的方式设置了对话框 . 确保所有组件使用相同的填充/边距/字体设置样式以用于选定的,未选择的和按下的状态,否则尺寸计算可能存在缺陷 .
还要验证EDT中是否显示了对话框,否则可能会发生奇怪的事情 . 例如 . 如果从本机线程调用它 .
我刚刚在EDT上验证了它的默认主题是这样的: