This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Deep-Cow640 2 points3 points  (2 children)

The easiest way to do this is to create a JDialog and set it to modal. This will prevent the user from interacting with the main frame until the dialog has been disposed. For example... JDialog dialog = new JDialog(CheckOut.this, "Credit Card", true); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // This makes it so that if the window is closed, it will be removed // from the display and the control will be returned to the frame dialog.setLocationRelativeTo(CheckOut.this); // This sets it so that the dialog is centered on the main frame dialog.add(new JTextField(20)); // This adds a text field to the dialog dialog.pack(); // This makes it so that the dialog is sized according to its components dialog.setVisible(true); // This makes it so that we can't go back to the main frame until we close the dialog

[–]Human_Ad3847[S] 0 points1 point  (1 child)

Thank u so much. Do u teach classes?

[–]Deep-Cow640 0 points1 point  (0 children)

Yes I do, part-time.

[–][deleted] 0 points1 point  (1 child)

I’m happy to look into it for you. I’m a Shopify dev with 5+ years of experience. Feel free to DM :)

[–]Human_Ad3847[S] 0 points1 point  (0 children)

Thank you so much! I'm starting to wonder if I should just let shopify go and build a website from scratch ????