Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

New Panel question for Swing

  Asked By: Kuhaylah    Date: Aug 12    Category: Java    Views: 839
  

I have created a class let's call addCustomer that extends JPanel.

In my "main" program class, I can call addCustomer and add it to my
main JFrame, however, what I wish to do is create a JButton and when
the button is pressed, I want the addCustomer form to pop up in it's
own "Window".

I'm sort of new to swing, so I'm not sure how to proceed. Any ideas?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Aalia Arain     Answered On: Aug 12

OK. I figured out one solution. Instead of extending JPanel or JFrame,
I extened JDialog and everything is working as expected.

I would still like to know what I asked below. Basically, I want to
write a "Main Menu" that loads other functions of the program.

 
Didn't find what you were looking for? Find more on New Panel question for Swing Or get search suggestion and latest updates.




Tagged: