succes code with JTextPane