Exemplo n.º 1
0
 public void remove(T key) {
   remove(items.remove(key));
   showEmptyMessage();
   setSize(getPreferredSize());
   validate(); // Update container
   containerWindow.pack();
 }
Exemplo n.º 2
0
 public DynamicList(ItemEditor<T> editor, Window window) {
   this.editor = editor;
   containerWindow = window;
   GridLayout listLayout = new GridLayout(0, 1);
   setLayout(listLayout);
   items = new LinkedHashMap<T, JPanel>();
   emptyLabel = new JLabel("Survey is empty.");
   showEmptyMessage();
   setSize(getPreferredSize());
   setOpaque(true);
   setBackground(Color.WHITE);
 }