Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Adding JScrollPane to JPanel!

 
Behrouz Hosseini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I am trying to add scrolling function to my text area but
Could you please let me know what i am doing wrong here?!
I am really frustrated!
First I add the JScrollPane to my jpanel and then I tried to add japanel to JScrollPane but!
Here is the code, I have three classes

Best Regards
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there's a really simple solution, and, believe me, you'll give yourself a smack in the head when you find it,
but as you rarely reply to any help you get, I'll only give you a hint:

look at 'exactly' what you're adding to pan.
 
Behrouz Hosseini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn wrote:there's a really simple solution, and, believe me, you'll give yourself a smack in the head when you find it,
but as you rarely reply to any help you get, I'll only give you a hint:

look at 'exactly' what you're adding to pan.

Thanks for you reply but, honestly I have two add method for pan whchi is adding output and button to pan.I also tried to add scroll to pan

which create an inactive scroller on the frame! but it still not working
 
Rob Spoor
Sheriff
Pie
Posts: 20529
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the direct parent of output? Is it really pan, or something else maybe?
 
Behrouz Hosseini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:What is the direct parent of output? Is it really pan, or something else maybe?

common guys for god sake let me know what's wrong?!
as far as I know I added the scroll er to pan.isn't it enough?
what do you mean of direct parent of output?
thanks anyway
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
project managers answer to such kind of questions...........................

you are making a very silly mistake,,,,,,,,,,,,,,,
but they donot know what a silly mistake can do in computers....................
hahahahahahha
 
Rob Spoor
Sheriff
Pie
Posts: 20529
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Behrouz Hosseini wrote:
Rob Prime wrote:What is the direct parent of output? Is it really pan, or something else maybe?

common guys for god sake let me know what's wrong?!
as far as I know I added the scroll er to pan.isn't it enough?
what do you mean of direct parent of output?
thanks anyway

You added pan to scroll when you constructed the JScrollPane, not vice versa. You now need to add scroll to the panel, not pan.
 
Rob Spoor
Sheriff
Pie
Posts: 20529
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
phil sohan wrote:project managers answer to such kind of questions...........................

you are making a very silly mistake,,,,,,,,,,,,,,,
but they donot know what a silly mistake can do in computers....................
hahahahahahha

If you have nothing nice to say then don't say anything at all. Be Nice!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic