The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
import-bot (20211) [Avatar] Offline
[Originally posted by hly]

I am just curious about how I can find swing source code about making
underline for text. Because I want make some special line for text.

import-bot (20211) [Avatar] Offline
Re: need source code for underline
[Originally posted by matt]

See the JTextPane demo in chapter 11 here:

...look at the static SimpleAttributeSets and use the StyleConstants
class to build your own attribute set with the underline attribute.
You can the use this set and apply to any text you like.

For a more advanced example see chapter 20...