开发者

JDialog, Error display Query?

开发者 https://www.devze.com 2023-03-13 05:34 出处:网络
I have Class which extends JDialog. Have an another JDialog declared inside the class as private JDialog Dialog = new JDialo开发者_如何学编程g(this);

I have Class which extends JDialog.

Have an another JDialog declared inside the class as

private JDialog Dialog = new JDialo开发者_如何学编程g(this);

I want to display a error dialog in the declared dialog of the class.

How can i Achieve this.

I needed it for display purpose...now that they JTextfields in the declared dialog, need to put a error dialog... at the center of the declared dialog... this is the requirement

But error dialog are visible, but behind the declared dialog, i.e on the derived JDialog of the class...

Thank you in advance....


I do not know exactly what you mean. However, if you want an error message dialog, why don't you just use a JOptionPane? It works very easy, e.g. like this:

JOptionPane.showMessageDialog(null, "message", "title", JOptionPane.ERROR_MESSAGE);

For layout, you can even use html in the message. Like for example:

<html>This went <b>wrong!</b><br>Next line</html>

JDialog, Error display Query?

Hope this is what you need :)


You must show the error dialog withing the child dialog. BTW, use a JOptionPane to show error dialogs.

0

精彩评论

暂无评论...
验证码 换一张
取 消