Skip to main content

JDialog behaving not expected

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2011-11-02

Hallo everyone,,

sorry for my bad english before..

i have one project ,, in my project. i have 2 JFrame , i call MainFrame and other one is SecondFrame, in SecondFrame i give a java.swing.Timer object , which in periodic make SecondFrame will showing a JDialog object. and the problem , when the MainFrame in Front of SecondFrame. JDialog whose shown bring SecondFrame(JDialog's parent) and itself to Front of MainFrame. exactly i not expect it behavior of a JDialog like that... when JDialog shown. it doesn't bring SecondFrame and itself to Front .because the JDialog just belong to SecondFrame. it should not influence MainFrame

in my code i use setModalityType and i set it to DOCUMENT_MODAL

anyone can help me, for fix this problem.... THANKS