super(Parent,"Upload Patch to Repository",false); JPanel container= new JPanel(); container.setLayout (new BorderLayout()); JPanel p4 = new JPanel(); p4.setLayout (new ColumnLayout()); l1 = new JLabel("Patch Type: ");  JPanel buttonPanel = new JPanel(); JPanel buttonPanel2=new JPanel(); JButton upload = new JButton("Upload"); upload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { PatchBasket library=(PatchBasket)JSLDesktop.getSelectedFrame(); Patch q	= library.GetSelectedPatch(); uploadPatch(q); }catch (Exception ex){JOptionPane.showMessageDialog(null, "Patch Must be Focused","Error", JOptionPane.ERROR_MESSAGE);} }}); buttonPanel2.add(upload); JButton play = new JButton("Play"); play.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { play(); }}); buttonPanel2.add(play);  JButton ok = new JButton("Cancel"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { OKPressed(); }}); buttonPanel.add( ok ); getRootPane().setDefaultButton(ok); p4.add(l1);  container.add(p4,BorderLayout.NORTH); container.add(buttonPanel2,BorderLayout.CENTER); container.add(buttonPanel,BorderLayout.SOUTH); getContentPane().add(container);  pack(); centerDialog();
super(Parent,"Upload Patch to Repository",false);
  public UploadPatchDialog(JFrame Parent) {        super(Parent,"Upload Patch to Repository",false); 	JPanel container= new JPanel();        container.setLayout (new BorderLayout());        JPanel p4 = new JPanel();        p4.setLayout (new ColumnLayout());	l1 = new JLabel("Patch Type: ");	JPanel buttonPanel = new JPanel();	JPanel buttonPanel2=new JPanel();	JButton upload = new JButton("Upload");	upload.addActionListener(new ActionListener() {	                       public void actionPerformed(ActionEvent e) {                                try {					PatchBasket library=(PatchBasket)JSLDesktop.getSelectedFrame();					Patch q	= library.GetSelectedPatch();					uploadPatch(q);			       }catch (Exception ex){JOptionPane.showMessageDialog(null, "Patch Must be Focused","Error", JOptionPane.ERROR_MESSAGE);}			       }});        buttonPanel2.add(upload);	JButton play = new JButton("Play");	play.addActionListener(new ActionListener() {	                       public void actionPerformed(ActionEvent e) {                                 play();			       }});        buttonPanel2.add(play);	JButton ok = new JButton("Cancel");        ok.addActionListener(new ActionListener() {	                       public void actionPerformed(ActionEvent e) {                                   OKPressed();			       }});	buttonPanel.add( ok );	getRootPane().setDefaultButton(ok);        p4.add(l1);	container.add(p4,BorderLayout.NORTH);	container.add(buttonPanel2,BorderLayout.CENTER);	container.add(buttonPanel,BorderLayout.SOUTH);	getContentPane().add(container);       // setSize(400,300);        pack();	centerDialog();  }