aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Problem with Adding JScrollPane to JPanel! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with Adding JScrollPane to JPanel!" Watch "Problem with Adding JScrollPane to JPanel!" New topic
Author

Problem with Adding JScrollPane to JPanel!

Behrouz Hosseini
Ranch Hand

Joined: Feb 15, 2010
Posts: 31
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

Joined: Jun 09, 2003
Posts: 4632
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

Joined: Feb 15, 2010
Posts: 31
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

Joined: Oct 27, 2005
Posts: 19672
    
  18

What is the direct parent of output? Is it really pan, or something else maybe?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Behrouz Hosseini
Ranch Hand

Joined: Feb 15, 2010
Posts: 31
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

Joined: Mar 17, 2010
Posts: 1051

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


SCJP6.0,My blog Ranchers from Delhi
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

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

Joined: Oct 27, 2005
Posts: 19672
    
  18

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Adding JScrollPane to JPanel!