This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes ScrollPane behave differently Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "ScrollPane behave differently" Watch "ScrollPane behave differently" New topic
Author

ScrollPane behave differently

Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

Can any one tell me the difference in the behaviour of the ScrollPane Vs JScrollPane in the following code.



I tried to use the same piece of code in JScrollPane and in the output the JTextPane which holds the DefaultStyledDocument automatically wraps the text.But instead of JScrollPane(swing) if i use ScrollPane(AWT) then the JTextPane doesn't wraps the text.

Why is this behaviour?
And also i need to achieve JScrollPane without wrapping text.For that what i have to change....
Awaiting your reply
Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

I got answer to my query in this forum.

But, can anyone explain me why JScrollPane behave like that.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: ScrollPane behave differently
 
Similar Threads
Manually sizing JScrollPane
Changing the font of Selected Text in JTextPane
JTextPane + Document + Attributes issues
JTextPane
JTextPane + KeyListener (Double Character problem); 70 line program