Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin


Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello Mr friedMan,
first thank you for your answer!but I had a problrm too.
for more details I have a textarea , a textfield and a button .
the button is to run a file.clp,which means when I click on it : I "batch " the file.clp,the "watch all" then "reset" and finally "run" it.
my file .clp is the example(sticks.clp) which is in jess/examples directory.
and the textArea is for output and the textfield is for input!
when I click on the button the execution starts normally,but it needs data to be entered as an answer of question for example yhe first qestion that appears in the textAres is :Who moves first (Computer: c Human: h)?
and I can't enter my answer in the textField.
I have done what yo said to me(add an action listner to a textfield .but I the reslt was the same!!!
must I add an action Listner to the button or what must I add?

waiting for your answer!!!

author and iconoclast
Posts: 24207
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect that you've called run() directly from the event handler for the button, which prevents the GUI from handling any more events until run() returns. You need to spawn a separate thread from the button's event handler and run Jess from there.

Note that this isn't a Jess issue at all; this is just how you write Java GUIs.
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic