1

I am using the JFrame feature in NetBeans in order to make it simpler to customize and edit. In my program, clicking a button calls an action that displays a dialog box. I want to have an image inside of that dialog box. In NetBeans along with its JFrame editor you can add boxes and customize them, along with a dialog box. Which means it will be easier to edit that dialog box.

How to I call that custom dialog box to display when the button is clicked?

To put it more simply without the need for puting code. I have created a cusome dialog box in netbeans GUI builder. Now, how to I call/use that custome dialog box inside of my actual JFrame, which was also coded inside the netbeans GUI editor, and is located inside the same package and all.

1
  • Can you add some code to your question, like the relevant parts of your main frame and your custom dialog? Commented Dec 5, 2014 at 20:42

1 Answer 1

1

First Drag and drop Swing Windows >> Dialog. Then inside your code write this line to show it

jDialog1.setVisible (true);

After that double click on the Dialog design and add as many components as you like

Best Wishes

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.