Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #4084
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail |
|---|---|
| From | "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> |
| Subject | Re: recreating timesharin |
| Message-ID | <g8ugah$iqd$1@registered.motzarella.org> (permalink) |
| X-Comment-To | comp.lang.java.gui |
| Newsgroups | comp.lang.java.gui |
| In-Reply-To | <7df04a4a-bf7a-4615-9fb8-6a1664f231c5@d45g2000hsc.googlegroups.com> |
| References | <7df04a4a-bf7a-4615-9fb8-6a1664f231c5@d45g2000hsc.googlegroups.com> |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] |
| Lines | 55 |
| Date | Wed, 27 Apr 2011 15:48:36 GMT |
| NNTP-Posting-Host | 96.60.20.240 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1303919316 96.60.20.240 (Wed, 27 Apr 2011 10:48:36 CDT) |
| NNTP-Posting-Date | Wed, 27 Apr 2011 10:48:36 CDT |
| Organization | TDS.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.gui:4084 |
Show key headers only | View raw
To: comp.lang.java.gui On 25/08/2008 16:29, Tom A. allegedly wrote: > I was looking through some old pascal line printer listings from > <mumble mumble> decades ago, and thought I'd try to recreate an old > game I wrote in Java. Java, of course, doesn't do WRITELN and READLN > from the terminal, Doesn't it? <http://java.sun.com/docs/books/tutorial/essential/io/cl.html> > so I created a jframe JFrame > with a jscrollpane JScrollPane > containing a jtextarea JTextArea > for output, and below that a jtextfield JTextField > to be > the input area. The question is, how to make the program stop and > wait for input when it needs it. > > I created a class called BasicIO that had a synchronized readln() > method that did a wait(), and an event listener that would do a > notify() when the event was from the input field, but it kept giving > me an > IllegalMonitorStateException. Because you haven't acquired the Object's monitor. <http://java.sun.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html> > Obviously, I'm quite confused by threads and monitors, and was hoping > someone could enlighten me? <http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html> And encompassing: <http://java.sun.com/docs/books/tutorial/reallybigindex.html> -- DF. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
recreating timesharing IO "Tom A." <tom.a.@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: recreating timesharin "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: recreating timesharin "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: recreating timesharin "Tom A." <tom.a.@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: recreating timesharin "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: recreating timesharin "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: recreating timesharin "Tom A." <tom.a.@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
csiph-web