Everytime I open a JFrame from my main JFrame It appears in front of my main JFrame. I know how to open it in different positions of the screen but that doesn't solve the problem.
I have no idea how to open it behind the main JFrame. Any help would be appreciated.
You can use toBack() method after setVisible(true)
method to open New JFrame
behind the main JFrame.
Example code:
newFrame.setVisible(true);
newFrame.toBack();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.