Paste printing in reverse order
Hi i am using this code as the Document Style
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
try{
for (int i = 0; i < str.length(); i++) {
// for(int i = str.length() ; i > 0 ; i--){
String s = String.valueOf(str.charAt(i));
if(Main.Mainmenu.seqmode==3) {
StyleConstants.setForeground(style,Color.BLACK);
}
else{
StyleConstants.setForeground(style,getCharacterColor(s));
}
super.insertString(offs, s, style);
}
}
catch(Exception e) { }
}
And also i am using a TextPlane Component When i call the paste inbulit method the method works buts prints in the reverse direction..
Can any one Help me in this regard

