Hi!

Now, I know this is more related to Swing than Clojure, but they won't
be able to read my code in a general Java forum.

I have a JTextPane [1] inside a JScrollPane [2] and I would like to
have horizontal scrollbars rather than word-wrapping. I try to disable
word-wrapping by overriding the JTextPane.setSize method such that the
dimensions from the JTextPane.getPreferredSize is used instead of the
dimension parameter parsed to .setSize. The consequence of this
disabled word-wrapping but there is an unwanted side-effect: there is
no horizontal scrollbar when the content is wide and even if I force
the horizontal scrollbar through policy on the JScrollPane, they will
have no effect. Any attempt to move the document using the forced
horisontal scrollbars will see the document jumping right back to
where it came from.

Finally, it may be worth to mention that this JScrollPane is used in a
JSplitPane [3], in the event that makes any difference.

I hope someone can tell me what I'm doing wrong here.

[1]: 
http://github.com/karmazilla/textjure/blob/b184f842686861a3b4a947a24ea92a610edd8b46/textjure.clj#L271
[2]: 
http://github.com/karmazilla/textjure/blob/b184f842686861a3b4a947a24ea92a610edd8b46/textjure.clj#L318
[3]: 
http://github.com/karmazilla/textjure/blob/b184f842686861a3b4a947a24ea92a610edd8b46/textjure.clj#L627

-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to