private void addBed(JPanel roomPanel, Bed bed, boolean empty) {
JButton b = new JButton();
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
Bed bed = findSelectedBed((JButton) actionEvent.getSource());
if(bed!=null) {
try {
Patient p = bed.getPatient();
if(p!=null && listener!=null) {
listener.patientSelected(p);
}
} catch (IOException e) {
e.printStackTrace();