List of usage examples for com.jgoodies.validation ValidationResult isEmpty
public boolean isEmpty()
From source file:ru.goodfil.catalog.ui.forms.FilterWindow.java
private static void showValidationPanel(JList list, ValidationResult result) { list.setBorder(new LineBorder(Color.BLACK)); list.setBackground(Color.YELLOW); list.setCellRenderer(new MessagesRenderer()); if (result.isEmpty()) { list.setVisibleRowCount(0);//from w w w. ja va 2s . co m list.setVisible(false); } else { list.setVisibleRowCount(result.getErrors().size()); list.setModel(new ArrayListModel<ValidationMessage>(result.getErrors())); } list.repaint(); }