🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.java.programmer
1 messages
1 total messages Started by Ramon F Herrera Thu, 04 Jul 2002 23:51
How to place the blinking bar in a TextField?
#289
Author: Ramon F Herrera
Date: Thu, 04 Jul 2002 23:51
19 lines
1784 bytes
My application has a JLabel, a JTextField next to it and
a button.  The user is suppossed to type some value inside
the text field and either (a) press <return> or (b) click
in the "run" button.

So I have two questions:  how can I associates the return
key being pressed to the program performing a certain action?
(currently the only way is by clicking on the button).
I guess the button must be highlighted in a special way first.

How can I position the vertical text editing blinking bar
inside the text field programmatically?  Currently the bar
is in the desired (and only) text field only the first time
the app is executed, form then on, the user has to click
inside the text field to locate the bar there.

TIA,

-Ramon F. Herrera
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads