rendered paste bodyprivate void displayQueue(String queueName) {
// Column titles
Object[] colNames = new Object[2];
colNames[0] = "Process";
colNames[1] = "Time Remaining";
if (queueName.equalsIgnoreCase("printer"))
dPanel = new JTable(sim.printer.view(), colNames);
else if (queueName.equalsIgnoreCase("disk"))
dPanel = new JTable(sim.disk.view(), colNames);
else
dPanel = new JTable(sim.readyQ.view(), colNames);
this.getContentPane().remove(scroller);
scroller = new JScrollPane(dPanel);
this.getContentPane().add(scroller, "Center");
this.pack();
}