java - JTextArea indentation -
i'm having problem jtextarea (not problem though). want create own college program, 1 of function write down , save list of homework each day. it's text area having main function here, type lecturer said. text area act windows original notepad, not keeping indentation. questions are:
how have function press shift+tab key decrease indentation one.
if number 1 possible, how program have behaviour when press enter key, have new line previous indentation? netbeans , other ide.
edited: i'm beginner in java, in truth, i'm making program while studying java in college.
how have function press shift+tab key decrease indentation one.
you need use key bindings listen user typing shift+tab.
if number 1 possible, how program have behavior when press enter key, have new line previous indentation? netbeans , other ide.
use similar piece of logic capture enter key presses. then, check previous line in editor , count number of tab characters preceding text. output similar number @ start of new line.
Comments
Post a Comment