Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to remove panels from a frame  RSS feed

 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to switch between screens so I thought switching btw panels is a good idea but I am not really able to remove panels and put new panels into the frame. I appreciate any kind of help in this context....thanks

the code which does this in my program is...



This is the full working program:

 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to post small code samples. Most people will see more than 20 lines of code and move on to the next question.
You can solve your problem with a Card Layout
 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can not change layout again. Already I had problems with sizing in GridLayout so I chose GridBagLayout, now you are asking me to change to Card layout and that requires work.
1. Could you tell me what exactly is the problem why does not it work???

2. I just want to know how you guys switch btw screens or do you change frames or panels or remove/add components in panels

You commented to put short codes, if you see the post again, I have the given the piece of code which does not work and have given the whole program for users to run and see how it works and where the problem is....hope you do understand me...
 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have solved the problem. The problem was because of the absence of pack() statement after I remove/add panels to the frame.
 
Sloan Bowman
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should use the panel.validate() also if you have the chance this will help you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!