title: How do I make a selected Combobox value display different text?
body: <p>I am new to Java and couldn't find any answers for my problem that I was able to understand.
  I want to make a selected value in my ComboBox change what text is displayed in the textfield.</p>
  
  <p>For example, if the user selects an artist in the combobox, then the artists' albums are displayed in the textfield.</p>
  
  <p>Any help is appreciated. Thanks!</p>
  
  <pre><code>    private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
   String a = (String)jComboBox1.getSelectedItem();  
  int artists = 0;
  switch (artists){
      case 0: jTextField1.setText("Take Care, Nothing Was The Same, Views, More Life, Scorpion");
  break;
      case 1: jTextField1.setText("Stoney, Beerbongs &amp; Bentleys");
  break;
      case 2: jTextField1.setText("One Love, Listen, Nothing But the Beat");
  break;
      case 3: jTextField1.setText("Ready for the Weekend, 18 Months, Motion");
  break;
      case 4: jTextField1.setText("Cole World: The Sideline Story, 2014 Forest Hills Drive, 4 Your Eyez Only");
  break;
      case 5: jTextField1.setText("My Beautiful Dark Twisted Fantasy, Yeezus, The Life of Pablo, ye");
  break;
      case 6: jTextField1.setText("Parachutes, a Rush of Blood to the Head, X&amp;Y, Viva La Vida, Mylo Xyloto");
  }
      }   
  </code></pre>