Home » Category » Java Programming

Java Programming: Z-order value for JDialog

202| Sun, 10 Feb 2008 00:42:00 GMT| rajiparthiban| Comments (4)
Dear all,
I have a JFrame in which I have add a toolbar inside a JPanel which is kept at the top of the JFrame. There are four buttons in the toolbar. If I click the last button, a JDialog should open in the remainig space of JFrame.

But my problem is this JDialog is getting overlapped with the last two buttons and the last two buttons are above the JDialog if opened.

I tried the following code but no use:

<code>
JDialog.setAlwaysOnTop(true);
</code>

how can i set rectify this problem?. Please help
Thankyou

Keywords & Tags: z-order, value, jdialog, java, programming

URL: http://java.itags.org/java-programming/332350/
 
«« Prev - Next »» 4 helpful answers below.
Try calling JDialog.toFront() when it is displayed.

Technical skill is mastery of complexity, while creativity is mastery of simplicity...
E. C. Zeeman

dlorde | Sat, 10 Nov 2007 02:19:00 GMT |

Sir,
I have attached my page design in word document. There you can see the change Location dialog displayed back of the buttons in toolbar above.
I have worked with all possible codes. There is something to do with lightweight component. I am not clear of the idea.

So how can I rectify the problem.

And I also when move my JDialog, the components are not displayed properly. After some times if i Click many times inside the JDialog then components are appearing one by one that too not proper.

Please help me.

Thanks
Raji

rajiparthiban | Sat, 10 Nov 2007 02:20:00 GMT |

Dear all,
I have explained my problem in the above posts. Please do help me to resolve this problem. I have read so much on Z-Order and heavy weight and light weight components . But in vain. Please do help.

Thanks in advance,
Raji

rajiparthiban | Sat, 10 Nov 2007 02:21:00 GMT |

You seem to have a dialog painting problem, which would account for the problems, but without seeing how the dialog has been implemented, it's not possible to say why.

Have you followed the standard procedures for displaying dialogs? (see How to Make dialogs (http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html)).

One day Chao-Chou fell down in the snow, and called out: "Help me! Help Me!" A monk came and lay down beside him. Chao-Chou got up and went away...
Zen Koan

dlorde | Sat, 10 Nov 2007 02:22:00 GMT |

Java Programming Hot Answers

Java Programming New questions

Java Programming Related Categories