@Override public void actionPerformed(ActionEvent e) { JTextField tf = (JTextField) e.getSource(); String test = tf.getText().trim(); if (!test.equals("")) { find(test); } }
@Override public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(CalendarCardPanel.PICKED_DATE)) { SimpleDate sd = (SimpleDate) e.getNewValue(); tf.setText(SimpleDate.simpleDateToMmldate(sd)); popup.setVisible(false); popup = null; String test = tf.getText().trim(); if (!test.equals("")) { find(test); } } }