• Post Reply Bookmark Topic Watch Topic
  • New Topic

SwingSet2 doesn't redraw when not in tabbedpane  RSS feed

Lance Hill
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to implement the ability to change between screens in my application. For example, you may view a calendar screen and click on a button to go to a "add new calendar entry" screen.

The SwingSet2 demo lets you click on a toolbar button and it loads and displays a new screen with the demo you selected. The only problem is when I try to load the demo directly into the demoPanel, rather than into a tabbed panel, one click on the toolbar button partially redraws the screen and a second click finishes the transition.

I do not understand why the behaviour changes and trying to trace through the code, it appears to me as if nothing different happens, other than it requires two passes through the code to make the new screen visible unless it is loaded into the tabbed pane. Is there something going on in the tabbed pane I am missing?

Can anyone please explain what is going on with this, or point me to an example of how to switch between different views in repsonse to a menu selection or button click?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!