Sorry, Last to the game this morning.

Glad to see you figured it out.

Just for mailing list archives, if used directly inside iText code the following code would need to be changed

Rectangle alloc = getVisibleEditorRect(ta);
ta.getUI().getRootView(ta).paint(g2,alloc);

protected Rectangle getVisibleEditorRect(JTextPane ta) {
Rectangle alloc =ta.getBounds();
if ((alloc.width > 0) && (alloc.height > 0)) {
alloc.x = alloc.y = 0;
Insets insets = ta.getInsets();
alloc.x += insets.left;
alloc.y += insets.top;
alloc.width -= insets.left + insets.right;
alloc.height -= insets.top + insets.bottom;
return alloc;
}
return null;
}

to:

java.awt.Rectangle alloc = getVisibleEditorRect(ta);
ta.getUI().getRootView(ta).paint(g2,alloc);

protected java.awt.Rectangle getVisibleEditorRect(JTextPane ta) {
java.awt.Rectangle alloc =ta.getBounds();
if ((alloc.width > 0) && (alloc.height > 0)) {
alloc.x = alloc.y = 0;
Insets insets = ta.getInsets();
alloc.x += insets.left;
alloc.y += insets.top;
alloc.width -= insets.left + insets.right;
alloc.height -= insets.top + insets.bottom;
return alloc;
}
return null;
}


-Bill Ensley
www.bearprinting.com

On 4/5/2011 7:18 AM, [email protected] wrote:
Problem solved~~~

Dont bother with this problem any more~Thanks everyone for help~~~

----- ???????? -----
[email protected]
????????Post all your questions about iTexthere<[email protected]>, ??????[iText-questions] RE??Re: Re??Re:_Re??Re:__save_all_objects_in_JTextpane_in_one_go
??????2011-4-5 21:56:57


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev


_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to