private JList<String> machineList() { if (machineList == null) { machineList = ui.createList(boxes().toArray(new String[0])); machineList.addListSelectionListener(this); } return machineList; }
private JList<String> tubList() { if (tubList == null) { tubList = ui.createList(new String[] {}); tubList.addListSelectionListener(this); } return tubList; }
private JList<String> boxList() { if (boxList == null) { boxList = ui.createList(boxes().toArray(new String[0])); boxList.addListSelectionListener(this); } return boxList; }
public MoveATub() { super(new GridLayout(1, 4)); setFont(ui.getFont()); this.add(labeledPanel("From Machine...", boxList())); this.add(labeledPanel("Move Tub...", tubList())); this.add(labeledPanel("To Machine...", machineList())); this.add(buttonPanel(assignButton())); }