Hi,
Have to create an interface that will run a Payroll System application
using a JComboBox and JTextFields. I have to allow the user to specify
the type of employee they wish to create and then specify the data
concerning that employee. The output is displayed in a JTextArea. I
ask the user their name, social security no and the type of employee
from a JComboBox.
Depending on the type of employee the user chooses, is it possible to
display fields based on the type of employee on the interface? Or is
there a better solution?
Cheers Ian.
Thomas Weidenfeller - 08 Mar 2006 12:31 GMT
> Depending on the type of employee the user chooses, is it possible to
> display fields based on the type of employee on the interface?
Yes. Do you have a more specific question?
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
IanH - 08 Mar 2006 12:48 GMT
The Employee can be either hourly calculated or based on a salary so I
wnat two field to appear for hourly eg. A rate and hours textfield and
for salary I just want a textfield for them to input the salary.
To create an efficient interface I only want the hourly fields to
appear when the user clicks on hourly from the combobox type of
employee. Would these be done as separate interfaces and called when
the user chooses a type from the combo box.
I'm new to working gui's so maybe i'm making this to complicated for
myself. any suggestions?
Ian
Thomas A. Russ - 08 Mar 2006 17:20 GMT
> I'm new to working gui's so maybe i'm making this to complicated for
> myself. any suggestions?
> Ian
I suppose there are multiple ways to do this. I haven't tried it
myself, but I would take a look at using CardLayout for the variable
part of the interface. You just choose the approriate "card" to display
based on the combobox choice.

Signature
Thomas A. Russ, USC/Information Sciences Institute