Advertisement
ManZzup

Untitled

Oct 6th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. public class MainFrame extends javax.swing.JFrame{
  2.         public static Competition comp = new Competition();
  3. }
  4.  
  5. public class AddSwimmerDialog extends javax.swing.JDialog {
  6.         .....
  7.         private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
  8.                 //you create the object
  9.                 Swimmer s = new Swimmer();
  10.                 //now you need to store somewhere
  11.         MainFrame.comp.swimmers.add(s);
  12.         }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement