A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Swing / AWT / SWT
Joined: Sep 10, 2004
Mar 26, 2005 09:23:00
I wonder if there's anyway to (1) press a button (say ctrl-t) and the JtextArea will write a the NAME of the user (NAME=some
prepared in advance).
Currently I have it with a jbutton - but when the user press this button, the NAME is *append* to the jtextArea and not (2) getting in the right place (where the cursor is located).
Joined: Jan 14, 2004
Mar 26, 2005 11:25:00
You can bind these keys and the corresponding Action to the
or one of its parent JComponents. The
How to Use Key Bindings
page in the tutorial shows how to do this.
method that may be useful for adding the name. Also, its superclass
has handy methods for moving around in a
. You can find the
methods that apply to
Methods inherited from class
section of the
I agree. Here's the link:
subject: JTextArea question
Urgent: Submitting a form in a page and using it's values in an already open page
JRadioButtons in applet
JSP throwing null pointer exception the first time I run it
Back end validation problem .
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015