This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

panel and frame (Swing)

 
Elizabeth Luckose
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using a frame. The frame has a panel in its center. When I click a button in the toolbar in the frame, an internal frame is added to the center of this frame.Suppose after adding this internal frame to the frame, I display another dialog or frame and close this. What happens is that, instead of displaying this internal frame, this panel is shown first and only after sometime the internal frame is displayed.
Plese give a solution
Thanks
Elizabeth.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Elizabeth,
I am not exactly sure what you are doing. But a frame, by default, uses a BorderLayout manager. A BorderLayout only supports a single component in each of its sections. In your discussion you mentioned that you are placing 2 components into the Center (Panel and JInternalFrame). Since you can only have one, maybe you had better remove the Panel when you add the JInternalFrame.
NOTE: JInternalFrame is really designed for JDesktopPane to allow for overlapping components, etc.
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic