title: How to print an output on GUI textbox instead of Eclipse console?
body: <p>I am trying to allow a user click a btnGenerate which then generates a random number that is assigned to a phrase that can be called to print out the phrase in a box below the button in the application window in eclipse.</p>
  
  <p>The problem is that <strong>the random statement comes up on the Eclipse console instead of the textbox on my GUI.</strong> </p>
  
  <p>Any help is appreciated. Here is my code so far: </p>
  
  <pre><code>//generate crime button
  
  JButton generateBtn = new JButton("Generate Crime");
  generateBtn.setBackground(Color.LIGHT_GRAY);
  generateBtn.setFont(new Font("HGHeiseiKakugothictaiW3", Font.BOLD, 20));
  GridBagConstraints gbc_generateBtn = new GridBagConstraints();
  
  gbc_generateBtn.fill = GridBagConstraints.BOTH;
  gbc_generateBtn.insets = new Insets(0, 0, 5, 5);
  gbc_generateBtn.gridx = 15;
  gbc_generateBtn.gridy = 5;
  
  frmHeroVillains.getContentPane().add(generateBtn, gbc_generateBtn);
  generateBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
  
          /*random number generator that generates a number between 1-4 and outputs a random crime to the updatePane depending on which 
          number was generated */
          int number =  ((int) (Math.random()*4)+1);
          switch (number) {
          case 1:
              System.out.println("Jewelry Heist on main street!");
              break;
          case 2:
              System.out.println("Mugging in China town!");
              break;
          case 3:
              System.out.println("Boeing 247 - Hijacked!");
          default:
              System.out.println("Nothing to Report.");
              break;
  
  
          }
      ;
      JLabel updateLabel = new JLabel("UPDATE ALERT.... " + number);
              GridBagConstraints gbc_updateLabel = new GridBagConstraints();
              gbc_updateLabel.gridheight = 3;
              gbc_updateLabel.insets = new Insets(0, 0, 5, 5);
              gbc_updateLabel.gridx = 15;
              gbc_updateLabel.gridy = 12;
              frmHeroVillains.getContentPane().add(updateLabel, gbc_updateLabel);}    }
  );
  </code></pre>