title: JOptionPane inputs
body: <p>I'm new to Java, and I have to write a Java application that will ask the user to type in a sentence using a JOptionPane input dialog, go
  through each of the characters in the input and count the number of upper case letters, lower case letters and
  digits, and then print the counts using a <code>JOptionPane</code> message dialog. The application should then repeat this
  process until the user types the word STOP (or Stop, or STop, etc.)</p>
  
  <p>I think what I have so far does most of what I need it to do,but for some reason, the program ignores all other input except for when I type stop, which isn't meant to be part of the string, but the exit word. I appreciate the help and explanations.</p>
  
  <pre><code>import javax.swing.JOptionPane; 
  public class Project0 {
  
  public static void main(String[] args) {
      // TODO Auto-generated method stub
      String string1 = ""; 
      while(!string1.equalsIgnoreCase("Stop")){
          string1 = JOptionPane.showInputDialog("Input words or type 'stop' to end.");
          string1 += string1;
      }
      charcount(string1);
  
  
  
  }
  public static void charcount(String userin){
      int uppercount, lowercount, digitscount; variables
      uppercount = 0;
      lowercount = 0;
      digitscount = 0;
  
      for(int c = 0; c &lt; userin.length(); c++ ){ 
          char ch = userin.charAt(c); 
          if(Character.isUpperCase(ch)){ uppercount += 1; } 
          else if(Character.isLowerCase(ch)){ lowercount += 1; } 
          else if(Character.isDigit(ch)){ digitscount += 1; }
  
      }
      JOptionPane.showMessageDialog(null, "There are " + uppercount + " uppercase characters, " + lowercount + " lowercase characters and " + digitscount + " digits."); 
    }
  
  }
  </code></pre>