Correct dialog parentage

This commit is contained in:
comp500 2019-08-10 20:08:02 +01:00
parent 46bbc9b82e
commit 1623c0f880
2 changed files with 5 additions and 4 deletions

View File

@ -166,7 +166,7 @@ public class InstallWindow implements IUserInterface {
public Future<Boolean> showOptions(List<IOptionDetails> opts) {
CompletableFuture<Boolean> future = new CompletableFuture<>();
EventQueue.invokeLater(() -> {
OptionsSelectWindow dialog = new OptionsSelectWindow(opts, future);
OptionsSelectWindow dialog = new OptionsSelectWindow(opts, future, frmPackwizlauncher);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
});

View File

@ -25,12 +25,13 @@ public class OptionsSelectWindow extends JDialog implements ActionListener {
/**
* Create the dialog.
*/
OptionsSelectWindow(List<IOptionDetails> optList, CompletableFuture<Boolean> future) {
OptionsSelectWindow(List<IOptionDetails> optList, CompletableFuture<Boolean> future, JFrame parentWindow) {
super(parentWindow, "Select optional mods...", true);
tableModel = new OptionTableModel(optList);
this.future = future;
setModal(true);
setTitle("Select optional mods...");
setLocationRelativeTo(parentWindow);
setBounds(100, 100, 450, 300);
getContentPane().setLayout(new BorderLayout());
JPanel contentPanel = new JPanel();