private void filter() {
                String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
                if (text.length() == 0) {
                    rowSorter.setRowFilter(null);
                }
                else {
                	//TODO escape special characters
                    rowSorter.setRowFilter(RowFilter.regexFilter(text));
                }
                if (rowSorter.getViewRowCount() == 0) {
            		ingredientMappingLogPanel.removeAll();
            		ingredientMappingResultPanel.removeAll();
            		mainFrame.getFrame().repaint();
                }
                if (ingredientsTable.getRowCount() > 0) {
            		ListSelectionModel selectionModel = ingredientsTable.getSelectionModel();
            		selectionModel.setSelectionInterval(0, 0);
                }
             }
private void filter() {
                String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
                if (text.length() == 0) {
                    rowSorter.setRowFilter(null);
                }
                else {
                
                    rowSorter.setRowFilter(RowFilter.regexFilter(text));
                }
                if (rowSorter.getViewRowCount() == 0) {
            		ingredientMappingLogPanel.removeAll();
            		ingredientMappingResultPanel.removeAll();
            		mainFrame.getFrame().repaint();
                }
                if (ingredientsTable.getRowCount() > 0) {
            		ListSelectionModel selectionModel = ingredientsTable.getSelectionModel();
            		selectionModel.setSelectionInterval(0, 0);
                }
             }
private void filter() { string text = drugmappingstringutilities.safetouppercase(searchfield.gettext()); if (text.length() == 0) { rowsorter.setrowfilter(null); } else { rowsorter.setrowfilter(rowfilter.regexfilter(text)); } if (rowsorter.getviewrowcount() == 0) { ingredientmappinglogpanel.removeall(); ingredientmappingresultpanel.removeall(); mainframe.getframe().repaint(); } if (ingredientstable.getrowcount() > 0) { listselectionmodel selectionmodel = ingredientstable.getselectionmodel(); selectionmodel.setselectioninterval(0, 0); } }