![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: jframejpanel |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| Hi, I want to include my JPanel in my JFrame. The panel is set up and defined in a class called Contents which extends JPanel. I have decared a class called Container which extends JFrame. How can I get the JPanel into the JFrame while maintaining these two classes ? |
| |
| |||
| Thank you for your reply. I take note that you wouldn't normally create a class for a JPanel on its own. In this case the JPanel held a JList which held a Vector which held Strings. I struggled on before reading your answer and managed to inststantiate the class holding the panel and added it to the JFrame's ContentPane. Thanks again. |
![]() |
| Thread Tools | |
| Display Modes | |
| |