Hi Java servlet experts,
I initially posted this on a general Java
mailing list, but posting it here as well,
since I'd like to know how the functionality
below can be implemented with servlets as well,
either servlet-to-HTML or servlet-to-applet.
Original Q :
------------
I have some questions about the GUI design of
a small database maintenance application in Java
that I want to develop.
Description of the app :
It is an app to maintain a single table of a
database. Similar to the kind of app that can
be automatically generated by most GUI/RAD
Windows tools, such as PB/VB/Delphi. Features :
- be a Java application (possibly with ability to
convert to an applet/servlet later)
- GUI (AWT, not Swing - it's too slow)
- SDI (initially, maybe MDI later)
- will use JDBC
- menus, with menu options for the functions below
- functions (only for a single table initially) :
- login screen for database user/password
- add a record
- delete a record
- edit/update a record
- view a record
- search for records matching a condition :
- by primary key
- by column value(s) (only all AND or all OR initially,
i.e. if user enters col1 = val1, col2 = val2
and checks an AND radio button, the SQL where
condition should be "col1 = val1 AND col2 = val2,
while if user checks OR button, OR should be used
in the SQL condition)
Once the search returns, the matching records should be
displayed, and if the user clicks on one, the edit/update
screen should be shown. When the user saves/cancels the
edit, the list of records should be shown again.
Please suggest which GUI components would be suitable for this.
My initial stab at it suggests :
- Frame with Menus
- login option to be a menu option rather than the initial
screen, to allow the user to connect/disconnect without
having to reload the app each time
- clicking each menu option like add/mod should change the lower
part of the Frame contents to show the appropriate controls
for that option, e.g. if Add/Mod, should have Save/Cancel
buttons, while if View field, should only have Close button
- TextFields for the table columns, except a TextArea for
one memo-type column which is large - varchar(32000).
- Buttons for the actions like Save/Cancel/Close
- Choice for the AND/OR value
- a List for the matching records
Particularly interested in using the most suitable components
and the logic to communicate between them, e.g. should a different
Frame be popped up for each menu option, or should I just change
the panel in the frame that contains the table columns ?
If separate Frames, how to communicate between them, e.g. when
the user finishes an edit of a selected record, how to redisplay
the List ? Etc.
Appreciate any answers.
Vasudev
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html