title: Generating random frames/projects using Java (NetBeans)
body: <p>I was wondering if it is possible to generate random frames by storing them into an array or any methods you may suggest.</p>
  
  <p>For instance, in my program I want to randomly access different frames by clicking a button and this is the code I have so far.</p>
  
  <pre><code>private void btnNextActionPerformed(java.awt.event.ActionEvent evt){
  
  // Generating a random number from 1 to 25 because I have 25 frames
  int min = 1;
  int max = 25;
  Random rand = new Random();
  int randomNum = rand.nextInt(max - min + 1) + ,min;
  
  // I have 25 files with the same name but they end with a different number (from 1 to 25)
  String practice = "File" + randomNum
  
  // Opening new frame
  // Currently the code below does not work because I think "practice" is seen as a string and so the word is underlined in red
  new practice().setVisible(true);
  
  // Closing current frame
  this.dipose();
  }
  </code></pre>
  
  <p>I'm trying to store the frames/files/projects into an array, and then retrieve them using this code but it doesn't quite work.</p>
  
  <p>Basically when the user is finished a question, he/she will click on the next button which will bring him/her to a new frame, but I want the frames to be randomly generated.</p>