Skip to main content

JDialog behaving not expected

No replies
Fauzi_16
Offline
Joined: 2011-11-02
Points: 0

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