Last active
December 12, 2015 01:08
-
-
Save fanjavaid/4689147 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DoctorComboBoxListener implements ActionListener{ | |
| @Override | |
| public void actionPerformed(ActionEvent e) { | |
| Doctor doctor = (Doctor) MainFrame.cmbDoctor.getSelectedItem(); | |
| System.out.println(doctor.getId()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public MainFrame() { | |
| initComponents(); | |
| disableAll(); | |
| // Make fullscren startup | |
| setExtendedState(MainFrame.MAXIMIZED_BOTH); | |
| getPatientData(); | |
| getDoctorData(); | |
| cmbDoctor.addActionListener(new DoctorComboBoxListener()); | |
| visitDataTable(); | |
| getCaptureImgData(panelCapture); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void getDoctorData() { | |
| DoctorService doctorService = new DoctorService(); | |
| List<Doctor> list = doctorService.selectAll(); | |
| cmbDoctor.removeAllItems(); | |
| for (Doctor doctor : list) { | |
| cmbDoctor.addItem(doctor); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment