I want to use a JTextPena for writing but I want to limit the size of the writable area.
Lets say I want to allow writing only in 3 rows. Anything over 3 rows will beep and not be written.
Do I have to use DefaultStyledDocument? and if so how?