I have created two GUIs with netbeans. I simply do not know how to call them to display on the screen. I'm sure it's simple, but I must not be understanding properly. I created the GUIs as JPanels and all they have on them right now is some labels and buttons. After the first screen renders I want to click a button to display the second screen. Can someone point me in the right direction with some coding help this first time around? I can use samples to figure out GUIs from there.

Greatly appreciate it.

Recommended Answers

All 2 Replies

A JPanel has to exist inside something else.
To show it on screen that will usually be a JFrame or a JDialog.

When you have one of those you can easily display them, both have methods to achieve that.

I have created two GUIs with netbeans. I simply do not know how to call them to display on the screen. I'm sure it's simple, but I must not be understanding properly. I created the GUIs as JPanels and all they have on them right now is some labels and buttons. After the first screen renders I want to click a button to display the second screen. Can someone point me in the right direction with some coding help this first time around? I can use samples to figure out GUIs from there.

Greatly appreciate it.

Boy, that was easy! I read two "textbooks" and one Java reference book and didn't come up with the information that I had to start with a JFrame. Sorry to appear so new, but I am.

Now I get the read all through these same books and try the internet search to try to find out how and when to use MDI. Multiple Document Interfaces weren't too hard to read about in other languages, but ..........

Thanks for your help. This forum has been great to help me out!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.