/** EdiDialog constructor comment. */ public void show() { getContentPane().setLayout(new java.awt.BorderLayout()); JScrollPane center = new JScrollPane(); getContentPane().add(center, java.awt.BorderLayout.CENTER); list = new JList(); list.setBackground(parentWindow.getBackground()); DefaultListModel model = new DefaultListModel(); list.setModel(model); for (int i = 0; i < DesignFrame.processingElements.length; i++) { model.addElement((String) DesignFrame.processingElements[i][0]); } // list.ActionListener((ActionListener) this); center.setViewportView(list); JPanel down = new JPanel(); getContentPane().add(down, java.awt.BorderLayout.SOUTH); down.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 2, 2)); bOK = new JButton("OK"); bOK.addActionListener(this); bAdd = new JButton("Add"); bAdd.addActionListener(this); bCancel = new JButton("Cancel"); bCancel.addActionListener(this); down.add(bOK); down.add(bAdd); down.add(bCancel); pack(); setSize(getWidth(), getHeight() * 2); list.addKeyListener(this); super.show(); }