Thanks,
Ken
This was all added with Java 1.1
WBB
Please, allow me to qualify that... just a tad. What you said is exactly
correct, from an app using the AWT. However, if one only wish keyboard input
from STD via a textmode app, then pressing the return key is the ONLY way
you'll get the key strokes from the user... A very good example of POOR JVM
design...
--
/--------------------\
| Jerry McBride |
| mcbr...@erols.com |
\--------------------/
Yes, absolutely. I wrote the class Jot to simplify this for
people new to Java. Jot is simples to use, and it pops up a "jot pad"
in your otherwise non-GUI program. Anything you type on the jot pad
is sent straight to your program, keystroke by keystroke.
Jot is available at the same place as the Java FAQ: http://www.afu.com
Pete,
Out of haste I went and grabbed Jot.java. Thanks, but I have a question or two.
First off, does this require JDK1.2 and is Jot a GUI entity? If so, I'm still
in the cold for my text mode apps that wish to process keys as entered by the
user... My applications run on 1.1.x and text mode only... No GUI to speak of.
Thanks again.
It requires JDK 1.1 and up. There is nothing JDK 1.2 specific in it.
Jot is a GUI entity. No getting around that.
It is for people who want char-by-char input but are not ready to
dive into AWT programming just yet. So it won't be suitable for someone
who wants to avoid all GUIs completely.
It's mostly intended to help out students who are at one particular
phase of learning Java. They want char-by-char input but they haven't
reached the chapter on JTextFields yet.
What are the chances that Java will some day support non-buffered
input in non-GUI mode? Sometimes it is very convenient to process
each character as it's entered, and also convenient to run from a
command line. Any chance that Sun might agree enough to add a non-
buffered input stream to java.io.*?
Thanks,
Ken
My reasoning for asking about the JDK1.2 specificness is that Jot.java will not
compile on my OS/2 with JDK117. Javac complains it can't find the class
java.util.ArrayList during the import... I'll track this class down and see
what it's all about. Thanks.
: Please, allow me to qualify that... just a tad. What you said is exactly
: correct, from an app using the AWT. However, if one only wish keyboard input
: from STD via a textmode app, then pressing the return key is the ONLY way
: you'll get the key strokes from the user... A very good example of POOR JVM
: design...
I'm sorry, but this has nothing at all to do with "poor JVM design".
The lack of character at-a-time input is is no different than C or
C++, or for that matter, any other programming language I've ever
used.
I'll gladly admit that some good (and _most_ bad) implementations of
those languages have added non-standard libraries to do character at
a time input. Since some vendors make little effort to sort their
non-standard libraries out from the standard ones, people are often
extremely suprised to discover what their favorite language actually
supports.
Anyhow, to get you started, there is "JCurses" by Piotr Gucwa, at
http://www.geocities.com/SiliconValley/Grid/1239/ To be honest,
I've never used it. If it works well for you, please let us know.
--
Brent Ellingson (bell...@badlands.NoDak.edu)
"It is amazing how complete is the delusion that beauty is goodness."
-- Leo Tolstoy
I dissagree. Not only is it missing, there's no easy way of adding it into
your applications without using native methods. It's a glaring oversight that
would be easy enough to fix. Whether Sun realizes it or not, there is more to
writing applications than sticking strictly with the GUI...
--- snip ---
>Anyhow, to get you started, there is "JCurses" by Piotr Gucwa, at
>http://www.geocities.com/SiliconValley/Grid/1239/ To be honest,
>I've never used it. If it works well for you, please let us know.
>
If it's not in the JDK, I can't use it.
AMEN BROTHER! I'd add this to my MOST DESIRED java feature... GUI be damned...
On Thu, 18 Feb 1999 19:19:53 -0800, in
<36CCD859.3DBD@locked_and_loaded.reno.nv.us>
Ken <glockr@locked_and_loaded.reno.nv.us> wrote.....
> What are the chances that Java will some day support non-buffered
> input in non-GUI mode? Sometimes it is very convenient to process
> each character as it's entered, and also convenient to run from a
> command line. Any chance that Sun might agree enough to add a non-
> buffered input stream to java.io.*?
I wouldn't hold my breath on this one - even though the
goal could be achieved simply by wrapping portable 'C'
using just ANSI stdio functions. *sigh*
-- PGPfingerprint: BC01 5527 B493 7C9B 3C54 D1B7 248C 08BC --
_______ {pegwit v8 public key =581cbf05be9899262ab4bb6a08470}
/_ __(_)__ ___ ___ {69c10bcfbca894a5bf8d208d001b829d4d0}
/ / / / _ \/ -_|_-< www.geocities.com/SiliconValley/1394
/_/ /_/_//_/\__/___/@windsong.demon.co.uk PGP key on page
### end pegwit v8 signed text
c0d2a1562badbd318155932f23c1bc08e564b691cd427f90684d82021c64
7f660a2d301ef45295716c767c98659d47c34bae268635cdbeb73d8a3938
Jerry McBride wrote:
>
> In article <7aip8g$sta$1...@node2.nodak.edu>,
> bell...@badlands.NoDak.edu (Brent A Ellingson) wrote:
> >Anyhow, to get you started, there is "JCurses" by Piotr Gucwa, at
> >
>
> If it's not in the JDK, I can't use it.
>
> --
>
> /--------------------\
> | Jerry McBride |
> | mcbr...@erols.com |
> \--------------------/
--
Pierre A. von Kaenel
Math & Computer Science Dept.
Skidmore College
Saratoga Springs, NY 12866
If it's what you're paid to do... it suddenly becomes important. In my case
if it's not available in the jdk or api extentions, it's not wanted.