Results 1 to 3 of 3
- 07-27-2009, 05:31 PM #1Member
- Join Date
- Jul 2009
- Rep Power
You will likely need to show code and give greater detail in your problem's description for others to be able to help you. I'm wondering if instead you would benefit by using a CardLayout, but again given the information that's available to us, this is just a guess.
When posting code, please be sure to highlight the code after pasting it, and then pressing the code tag so that the code will retain its formatting and be readable. Best of luck.
- 07-28-2009, 01:34 PM #3
CardLayout is an excellent solution for switching panels in the same JFrame.
As the moderator has said, you should try to give more details on your problem and post some code for the rest to understand the problem better.
Just guessing, I think your current problem is that the JFrame doesn't revalidate its contents and that's way your new added JPanel doesn't show up. Try calling revalidate() in the JFrame.
Hope it helps.The web that offers Java utilities (classes) which make programming Swing applications an easier task: JMC Java utilities
- By Bluefox815 in forum AWT / SwingReplies: 7Last Post: 02-24-2011, 08:56 PM
- By linux1man in forum New To JavaReplies: 5Last Post: 01-21-2009, 09:46 PM
- By DC1 in forum New To JavaReplies: 4Last Post: 06-06-2008, 08:09 AM
- By vassil_zorev in forum AWT / SwingReplies: 1Last Post: 01-25-2008, 03:53 AM
- By saytri in forum New To JavaReplies: 6Last Post: 01-11-2008, 06:12 PM