Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow jdialog to be a parent rather than just jframe #4923

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

gcoopercos
Copy link
Contributor

Motivation:
In MekHq, the campaign creation user interface wasn't showing up. After tracking this down, the modal campaign dialog was coming up behind the original dialog that spawned it.

Without rearranging things too much, a straight-forward fix appeared to be to make sure that the modal dialog had the owner of the JDialog that created it, not the owning JFrame.

I am guessing that this works ok on some platforms so it's not an issue for some. I'm also guessing that this is the case because which JDialog is rendered in front is arbitrary if they have the same JFrame. Regardless, this feels like a fairly benign change.

Change Description:
The 'megamek' changes are just to allow a JDialog to be the parent of another JDialog in the abstract classes... Something Swing already supports. The real functional change will be in mekhq.

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, especially since it's purely additive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants