JTextField max length, JTextArea automatic scrolling
843804Mar 3 2005 — edited Mar 4 2008i cant find how to do 2 things,
i would like to limit the size of the text entered in a JTextField
i could probably do this by making its KeyListener trim off the extra from getText() and use setText(whateverIsLeft) but i was hoping there was a better way of doing this with something that is already there as this is a lot of work considering soemoen could just hold down a button and it would have to do it several times a second
also i need to set a JTextArea inside a JScrollPane so that when new text is appended to it, it scrolls the jtextpane down to the bottom, i could just make it write it at the top instead of appending it to the bottom but i REALLY dont want to =p
thanks