title: Passing user input values from a JOptionPane dialog box in Main to other classes in package
body: <p>I am rather new to java programming, so I am probably making hundreds of mistakes, especially in the way I am using classes and organization of my program.</p>
  
  <p>What I would like to do is use a JOptionPane to obtain a few integer and double inputs from the user (with the defaults in the boxes when the optionpane appears.</p>
  
  <p>Currently I have a Main class with my main method and the JOptionPane code in the main class. I would like to pass some of the input values to a public final class, where I have many static values used by a couple of other classes in my program.</p>
  
  <p>My Optionpane code looks as follows:</p>
  
  <pre><code>public static void main(String[] args){
  
      JTextField simsInput = new JTextField("1");
      JTextField pphInput = new JTextField("0");
  
      Object[] inputs = {
          "Number of simulations",simsInput,
          "Input people per household (0 for random pph based on probability",pphInput
      };
  
      JOptionPane.showConfirmDialog(null, inputs, "User Inputs", JOptionPane.OK_CANCEL_OPTION);
  
      String simsInputString = simsInput.getText();
      int numSimsI = Integer.parseInt(simsInputString);
      String pphInputString = pphInput.getText();
      int pphI = Integer.parseInt(pphInputString);
  </code></pre>
  
  <p>Can I, say for instance pass pphI to a public final class, to be used by other classes as a constant through the execution of the program?</p>