Creating a Non-databound Dialog in JOI (Functions/Subroutines/Programs)
Created at 07 MAR 2002 03:19PM
How do I create a non-databound dialog in JOI?
The attached example shows how to create the following dialog that prompts the user for a beginning and an ending date:
In Forte 3.0 or Netbeans 3.3.1 please mount the joi.jar archive and the directory that contains this unzipped example as follows:
Execute the TestingFrame class from the directory and you will get the following window:
This window is a test harness for calling the dialog window and displaying the returned results. In Forte 3.0 or Netbeans 3.3.1, double-click the "Get Dates" button at design time and you will see the following code behind the button:
The utilGetDatesDialog class is the non-databound dialog box that uses JOI controls to format the dates, but does not link back to a database. Please see the comments in that class' code, along with the ReadMe.doc document for the key elements of building a non-databound window.
On a separate note, since we all are used to Windows GUIs, the TestingFrame class contains code that changes the look and feel of the window to a Windows look and feel versus the default Java "Metal" look. This is the code that does that:
Hope this code is useful to you.
The JOI Development Team.
Click on the link below to download the files needed for this example: