Reputation: 15682
I've assimilated this idea that it is always bad to use a Swing component outside the EDT.
In my non-GUI program (as it currently is) I do however want to use some kind of marked-up string (containing non-visual logical styles that give some kind of "meta" info about bits of the string). DefaultStyledDocument works perfectly. But its package is of course javax.swing.text.
Am I alone in feeling it is inappropriate to use it in a non-EDT thread? Is there any alternative (other than to roll my own class or use the EDT despite having no GUI)?
Upvotes: 0
Views: 86