Per avere testo formattato devi usare un JTextPane, non una JTextArea.