List of usage examples for javax.swing.tree DefaultMutableTreeNode DefaultMutableTreeNode
public DefaultMutableTreeNode()
From source file:op.care.med.structure.PnlMed.java
private void txtSucheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSucheActionPerformed // treeMed.setCellRenderer(new DefaultTreeCellRenderer()); treeMed.setModel(new DefaultTreeModel(new DefaultMutableTreeNode())); // treeMed.setVisible(false); if (txtSuche.getText().isEmpty()) { lstPraep.setModel(new DefaultListModel()); } else {/* w w w. ja v a 2 s . c om*/ EntityManager em = OPDE.createEM(); Query query = em .createQuery("SELECT m FROM MedProducts m WHERE m.text LIKE :bezeichnung ORDER BY m.text"); query.setParameter("bezeichnung", "%" + txtSuche.getText() + "%"); lstPraep.setModel(SYSTools.list2dlm(query.getResultList())); em.close(); } }