Welcome to JEWL!


This file forms part of the JEWL class library.
Copyright © John English 2003. Contact address: je@brighton.ac.uk
The latest version of this library is available from http://www.it.brighton.ac.uk/staff/je/java/jewl/.
This software is covered by the terms of the GNU General Public License and is intended primarily for educational use. Please contact the author to report bugs, suggestions and other comments. Your feedback is always welcome.

Overview

JEWL (John English's Window Library) is a Java class library aimed at novices which enables reasonably sophisticated GUI applications to be built with a minimum of effort. JEWL is a deliberately simple system intended to allow beginners to build GUI-based applications in Java without tears. It hides much of the complexity involved in building GUI applications, and its use involves no "advanced" language concepts; it is intended to be accessible to programmers who are familiar with basic programming concepts. The model adopted is a simplified event-loop approach which is essentially procedural. It is implemented in pure Java using the Swing GUI library.

If you use JEWL, we'd be interested to hear about your experiences with it. Please feel free to contact the author at je@brighton.ac.uk with your comments.

Contents

Download page
Download the latest version of JEWL from here.
The JEWL tutorial
Read this for an introduction to the classes that make up JEWL and the facilities they provide, illustrated with many small examples. It includes instructions on installing JEWL.
Examples
A few larger and more sophisticated example programs which illustrate the practical use of many JEWL features:
JEWL class reference
The Javadoc documentation which forms the reference manual for the publicly-accessible classes and methods in the JEWL library.
Source code
The source code for the library, in which all the gory secrets are revealed.

Revision history

    $Log: index.html.rcs $
    Revision 1.6  2009/04/19 16:00:00  JE
    - Added menus to applets
    - Fixed careless error in Demo9_2 for tutorial
    - Documentation updates to match the above

    Revision 1.5  2008/01/28 15:00:00  JE
    - Added support for applets (classes Applet and AppletPanel)
    - Added class DirectoryDialog to allow selection of directories
      rather than just files
    - Documentation updates to match the above

    Revision 1.4  2005/09/28 14:00:00  JE
    - Added event listeners for page changes in tabbed panels and mouse clicks
      on labels
    - Changed event handling so that each user interface thread has a separate
      event queue (hence nextCommand() etc. will only now return events for
      windows created by the calling thread)
    - Changed the way the event monitor works to be able to create objects on
      the fly within BlueJ without having them promptly vanish again. The
      event monitor now calls System.exit(0) when there are no more frames
      or user interface threads (rather than just user interface threads).
    - Added a timer control
    - Fixed minor bug in assessment version of EditableComboBox
    - Documentation updates to match the above

    Revision 1.5  2008/01/27 15:00:00  JE
    - Added support for applets (classes Applet and AppletPanel)
    - Added class DirectoryDialog to allow selection of directories
      rather than just files
    - Documentation updates to match the above

    Revision 1.4  2005/09/28 14:00:00  JE
    * Added event listeners for page changes in tabbed panels and mouse clicks
      on labels
    * Changed event handling so that each user interface thread has a separate
      event queue (hence nextCommand() etc. will only now return events for
      windows created by the calling thread)
    * Changed the way the event monitor works to be able to create objects on
      the fly within BlueJ without having them promptly vanish again. The
      event monitor now calls System.exit(0) when there are no more frames
      or user interface threads (rather than just user interface threads).
    * Added a timer control
    * Fixed minor bug in assessment version of EditableComboBox
    * Documentation updates to match the above

    Revision 1.4  2005/09/12 14:00:00  JE
    * Added event listeners for page changes in tabbed panels and mouse clicks
      on labels
    * Changed event handling so that each user interface thread has a separate
      event queue (hence nextCommand() etc. will only now return events for
      windows created by the calling thread)
    * Changed the way the event monitor works to be able to create objects on
      the fly within BlueJ without having them promptly vanish again. The
      event monitor now calls System.exit(0) when there are no more frames
      or user interface threads (rather than just user interface threads).
    * Added a timer control
    * Fixed minor bug in assessment version of EditableComboBox
    * Documentation updates to match the above

    Revision 1.3  2004/08/30 18:00:00  JE
    - Added setValidator() method to Dialog and the Validator interface
    - Added Dialog.getString() methods
    - Modified TextField to call doEscape in the parent window when ESC is
      pressed (so that dialogs containing text fields can still be closed by
      pressing ESC even when the TextField has the keyboard focus)
    - Changed the name of Window's visible() method to isVisible() for
      conformity with Java naming conventions, and also because that's
      what I said it was called in the tutorial... :-(
    - Fixed the event listener in CheckBox, RadioButton to use ItemListener
      instead of ChangeListener
    - Fixed the event listener in ComboBox so that it only responds to
      comboBoxChanged events
    - Modified the tutorial where necessary to describe the above changes
    - Merged the assessment version of the source code with the distribution
      source code for easier maintenance

    Revision 1.2  2003/11/26 20:57:28  JE
    - TabbedPanel class added; section 5.4 on TabbedPanels added to tutorial.
    - Fixed bugs in validation routines in IntegerField and DoubleField.
      Integers can't start with "+" (why not?) and doubles might be just
      "." or "e" or "E" during entry.
    - Fixed bug in Window: commandAvailable() returned the opposite of the
      intended value (oops!).
    - Fixed bug in Frame windowClosing handler: close window before adding
      event. otherwise it sometimes gets past the test for frame valid in
      the main program before the call to close() happens.
    - If at least one frame has been created but no frame has ever been made
      visible when nextCommand() or isValid() is called, the first frame that
      was created is made visible. This guards against novices forgetting to
      call show() and then wondering why their program doesn't do anything.
    - If no windows are visible when nextCommand() is called, an exception is
      thrown. This prevents lockups which might be hard for novices to figure
      out.
    - The thread monitor from the pre-release version of JEWL has been reinstated.
      This calls System.exit(0) automatically when the last user interface
      thread dies. (A user interface thread is one which has created a window
      or has called Window.init() explicitly to prevent the program exiting
      until it dies.) Window.init() has been added for this purpose.
    # NOTE: this mechanism is not perfect; the main thread continues to report
      that it is alive even after it has died as the result of an exception.
      This is a Java bug which has been reported to Sun. However, the same
      thing would happen without the thread monitor unless main() called
      System.exit() in a finally clause, as the Swing event-handling thread
      would still be left running. In general, it seems easier to let programs
      terminate automatically whenever possible to avoid problems when novices
      forget to call System.exit() explicitly.
    - The setID() method will now only set the window ID once. The window ID
      defaults to zero, and once it has been changed to a non-zero value it
      cannot be changed again.
    - Various minor tidying-up and rationalisation changes to code, commentary
      and documentation.

    Revision 1.1  2003/03/22 01:00:00  je
    Initial revision