By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,736 Members | 1,982 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,736 IT Pros & Developers. It's quick & easy.

No solutions???

P: n/a
I have the following problem that is still unsolved since one month:

when in the content (StyledDocument) of a JTextPane two digits are following
each other - what you can test very easy - they should not be displayed as
normal (from left to right), but from top to bottom. That means they should
have the same x-coordinates, but different y-coordinates.

I think I have to change the Viewfactory or the Editorkit... Please Help

I need this to display fractions and vectors (math.).
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Daniel Forster" <tr*@zhwin.ch> wrote in message
news:ca**********@newshispeed.ch...
I have the following problem that is still unsolved since one month:

when in the content (StyledDocument) of a JTextPane two digits are following each other - what you can test very easy - they should not be displayed as
normal (from left to right), but from top to bottom. That means they should have the same x-coordinates, but different y-coordinates.

I think I have to change the Viewfactory or the Editorkit... Please Help

I need this to display fractions and vectors (math.).


I'm not an expert in Java GUIs, however it sounds like JTextPane may not be
appropriate for what you want to do. I would suggest a more 'graphics'
oriented pane where you have the option of positioning text fonts at any
desired (x,y) location and not be forced into the line by line format that
JTextPane seems to be, at least by default, written for.

l8r, Mike N. Christoff

Jul 17 '05 #2

P: n/a
I agree - use a JPanel and the drawstring method of the graphics

"Michael N. Christoff" <mc********@sympatico.caREMOVETHIS> wrote in message
news:hF********************@news20.bellglobal.com. ..

"Daniel Forster" <tr*@zhwin.ch> wrote in message
news:ca**********@newshispeed.ch...
I have the following problem that is still unsolved since one month:

when in the content (StyledDocument) of a JTextPane two digits are following
each other - what you can test very easy - they should not be displayed as normal (from left to right), but from top to bottom. That means they

should
have the same x-coordinates, but different y-coordinates.

I think I have to change the Viewfactory or the Editorkit... Please Help

I need this to display fractions and vectors (math.).


I'm not an expert in Java GUIs, however it sounds like JTextPane may not

be appropriate for what you want to do. I would suggest a more 'graphics'
oriented pane where you have the option of positioning text fonts at any
desired (x,y) location and not be forced into the line by line format that
JTextPane seems to be, at least by default, written for.

l8r, Mike N. Christoff

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 5/22/2004
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.