Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scrollbars on JFrame when JInternalFrame is bigger than the JFrame

 
Makesh Kumar Ramakrishnan
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to add ScrollBars to the JFrame(Parent screen), when the internal frame(child scereen) size is greater than the size of the JFrame. and those scroll bars should have the control over the child screen.

For example, when the height of the child screen is greater than the parent screen, then Vertical scroll bar should be added to the parent screen. So, In this case i couldn't view the bottom of the child screen without moving the scroll bar. when I move the scroll bar, I should be able to view the lower portion of the child screen.

Child screen size is fixed and it can be bigger than the parent screen in some cases. If it is bigger, then it should be within the boundary of the parent screen and all the components should be viewable to the user. In this scenarioo, I can think of only adding scrollbars to the parent screen and using that to view the entire child screen.


Is there anyway to do this?

Thanks,

Makesh
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes - you would make a Scrollable JDesktopPane to hold your internal frames.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic