Need Help with a Submit buttom and textField

T

Teresa

I need this to work with a sibmit button and call the information into a
GUI, Can somone please help?

String arg = e.getActionCommand();

//created a function for the patient ID (this is the key in the hashtable)
to be entered and brought up in the System window.
if (arg == "Submit")
{
PatIn patin;
patinToGet = pa.getPID();
patin = (PatIn)ph.get(patinToGet);
if(patin == null)
System.out.println("no match for "+ patinToGet);
else
System.out.println("Patient's ID =" + patin.getPID());
System.out.println("Patient Name = " + patin.getPaInName());
System.out.println("Patient Phone = " + patin.getPhN());
System.out.println("Patient DOB = " + patin.getDOB());
System.out.println("Patient StreetAddress = " + patin.getPaStAddress());
System.out.println("Patient City, State, Zip = " + patin.getCiStZp());
System.out.println("Insurance Provider ID = " + patin.getIPID());
System.out.println("Physician ID = " + patin.getPhID());
InsuranceProvider insuranceprovider;
insuranceproviderToGet = patin.getIPID();
insuranceprovider = (InsuranceProvider)ip.get(insuranceproviderToGet);
if(insuranceprovider == null)
System.out.println("no match for " + insuranceproviderToGet);
else
System.out.println("Insurance Name = " + insuranceprovider.getIpName());
System.out.println("Insurance Phone No. = " +
insuranceprovider.getPhoneNumber());
System.out.println("Insurance Address = " +
insuranceprovider.getAddress());
System.out.println("Insurance City, State, ZipCode = " +
insuranceprovider.getIpCiStZp());
System.out.println("Insurance Provide State Code = " +
insuranceprovider.getSC());

PhysiciansInformation physiciansinformation;
physiciansinformationToGet = patin.getPhID();
physiciansinformation =
(PhysiciansInformation)phi.get(physiciansinformationToGet);
if(physiciansinformation == null)
System.out.println("no match for " + physiciansinformationToGet);
else
System.out.println("Physician Name = " +
physiciansinformation.getPhName());
System.out.println("Physician Phone No. = " +
physiciansinformation.getPhPhno());
System.out.println("Physician Address = " +
physiciansinformation.getPhStAd());
System.out.println("Physician City, State, Zipcode = " +
physiciansinformation.getPhCiStZP());
System.out.println("Physician State Code = " +
physiciansinformation.getPhStCo());

}


if (arg == "Exit") //created and exit statement when exit button
is pressed.
{
System.exit(0);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top