|
James Perkins skrev den 11-02-2008 17:48:
Hello All,getting
I have a question that some what pertains to this thread. I myself am
learning Swing in order to make a nice GUI front end.
So, here is my question. How are you validating screen entries and
data to the screen? Do you have to write your own program to controlthis? I
would like to be able to throw a GUI over an already existing RPGprogram.
You should separate the GUI from the data structure holding the accepted
data.
You load the data structure from e.g. a data record or a JDBC rowset.
When you need to edit set each field in the GUI with the appropriate
data from the data structure, and when the user accepts with Ok you run
a validation on the fields to see if they are acceptable. If not you
flag as appropriate, and do not accept the Ok. If ok, then you set the
fields in the data structure from the GUI fields and go from there.
Do not let the GUI fields edit your data structure directly - eventually
that will give you trouble.
--
Thorbjørn
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.