Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void moveToQ1() {
- index = customerList.getSelectedIndex();
- if (index != -1) {
- browsing.dequeue(customerList);
- q1.enqueue(browsing, customerList, queue1, index);
- }
- }
- public void enqueue(QueLine queline, JList list1, JList list2, int index) {
- DefaultListModel<Customer> browseModel = (DefaultListModel<Customer>) list1.getModel();
- DefaultListModel<Customer> queueModel = (DefaultListModel<Customer>) list2.getModel();
- int selectedIndex = index;
- System.out.printf("%dn", selectedIndex);
- if(selectedIndex >= -1) {
- queueModel.addElement(browseModel.getElementAt(selectedIndex));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement