• Post Reply Bookmark Topic Watch Topic
  • New Topic

trouble in wrapping a JPanel into a JScrollPane

 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
i write a SSCCE ( actually i hope to be , if not,please let me know ) to demonstrate the problem i found to wrapping a JPanel into a JScrollPane that located within a frame :


line #13

I want scroll bars be appeared over the "bigPanel" when necessary ;

Maybe it is not possible ! or maybe i don't know how to

thanks in advance
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the scrollpane needs to have a preferredSize set as well

run this, then scroll down to see the inner scrollpane

 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I think this forum lack just one thing :

"A button in every posted message area to get thanks from visitors"

to prevent someone like me to post a reply just to say thank you very much

 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't mind. In fact, we encourage it. But we also have the "Mark as Resolved" button at the bottom, with the little .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!