Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

Terminal app

Thread view: 
mnml - 23 Nov 2007 10:45 GMT
Hi,
I am trying to code a terminal application. I would like to know if
there is "something" I can use from the java Api to avoid redrawing
all the characters on the screen.
thanks
Gordon Beaton - 23 Nov 2007 11:30 GMT
> I am trying to code a terminal application. I would like to know if
> there is "something" I can use from the java Api to avoid redrawing
> all the characters on the screen.

Most terminal applications never need to redraw the whole screen or
even parts of it. Maybe you had something more advanced in mind than a
line-based application?

From an old post, no idea of their status:

 http://www.bmsi.com/tuipeer/
 http://sourceforge.net/projects/javacurses/
 http://www.pitman.co.za/projects/charva/index.html
 http://java-readline.sourceforge.net/

/gordon

--
mnml - 23 Nov 2007 13:24 GMT
> > I am trying to code a terminal application. I would like to know if
> > there is "something" I can use from the java Api to avoid redrawing
[quoted text clipped - 14 lines]
>
> --

thanks for the links, yes it need to redraw the whole screen (it's a
game), I wondering if it's possible to do that without any external
libs.
Jeff Higgins - 23 Nov 2007 17:24 GMT
> thanks for the links, yes it need to redraw the whole screen (it's a
> game), I wondering if it's possible to do that without any external
> libs.

Have you looked into using the Full-Screen Exclusive Mode API?

<http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html>
Nigel Wade - 23 Nov 2007 12:53 GMT
> Hi,
> I am trying to code a terminal application. I would like to know if
> there is "something" I can use from the java Api to avoid redrawing
> all the characters on the screen.
> thanks

T

I have no idea if this is the sort of thing you are looking for, but have a look
for yourself:
http://sourceforge.net/projects/javacurses

I have never use the above, but I have in the past used the UNIX curses library
which is/was a library for addressing text based terminals/consoles in a
"graphical" way.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Martin Gregorie - 23 Nov 2007 13:51 GMT
>> Hi,
>> I am trying to code a terminal application. I would like to know if
[quoted text clipped - 11 lines]
> which is/was a library for addressing text based terminals/consoles in a
> "graphical" way.

This may not be what the OP wants. I just downloaded it to take a look.
There is almost no documentation apart from Javadocs output from the
classes, i.e. no really explanatory overview and no example code. It
looks to me as it if its meant to be an exact analogue of the C curses
library, allowing a Java program to handle screens and forms on a
console screen rather than painting it inside an AWT or Swing window.

To the OP: from this description is this what you want or are you
looking for code that emulates a text terminal within a Swing JPanel?

If the latter, I wrote a Java glass teletype emulation that was capable
of keeping up with my typing and with data coming in on a 9600 baud
serial connection. It could handle a remote interactive login session
with no noticeable delays when run on a 300 MHz PII box. I used an 80 x
25 JTextArea to represent the screen and handled writing to it by
manipulating the text content of the JTextArea.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Nigel Wade - 23 Nov 2007 14:40 GMT
>>> Hi,
>>> I am trying to code a terminal application. I would like to know if
[quoted text clipped - 18 lines]
> library, allowing a Java program to handle screens and forms on a
> console screen rather than painting it inside an AWT or Swing window.

I assumed from what the OP said that "terminal application" was an application
running within a terminal, and "redrawing all the characters on the screen" is
exactly what curses did for you.

The description in the original post was limited, so we have to fill in the gaps
and guess what was intended. Because of that I didn't download any info on the
package, I left that as an exercise for the OP...

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Martin Gregorie - 23 Nov 2007 23:15 GMT
>>>> Hi,
>>>> I am trying to code a terminal application. I would like to know if
[quoted text clipped - 27 lines]
> and guess what was intended. Because of that I didn't download any info on the
> package, I left that as an exercise for the OP...

I took a look because, if it would do things like emulating a VT-100,
xterm or wyse-120 terminal inside a GUI window, I may well have a use
for it. But I don't think it will do that.

Instead, it looks as if its targeted on allowing Java to do curses-type
things without needing a GUI interface (i.e. you could use it in a DOS
box, Linux or X-term console, or even on a physical character-mode
terminal (VT-100, Wyse-120 etc.).

However, it if can read, parse and interpret a termcap definition I can
at least swipe some code from it to glue on the back of my JTextArea
screen emulation. At some point I know I'll need an application that
emulates a terminal while using a socket connection to talk to some
emulated hardware running an OS that thinks its using a serial port.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

RedGrittyBrick - 26 Nov 2007 11:29 GMT
<snip discussion of java curses library etc>

> I took a look because, if it would do things like emulating a VT-100,
> xterm or wyse-120 terminal inside a GUI window, I may well have a use
[quoted text clipped - 10 lines]
> emulates a terminal while using a socket connection to talk to some
> emulated hardware running an OS that thinks its using a serial port.

JTA is a Java applet that emulates an ANSI terminal. I believe the API
can be used for other applications too.

http://javassh.org/space/Docs+and+Tutorials


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.