左边一个带滚动条的文本框,
输入英文字幕。
中间一个按钮,
右边统计每一个字母的个数。

解决方案 »

  1.   

    你要的核心方法如下:
    1.取得左边textarea的内容;
    2.统计每个单词的长度,用split()方法取得一个String[],然后可以得到每个单词得长度;
    3.在右边显示出2所取得得结果。
    基本上就这些了,不同得环境1、3步骤不同,你可以按自己得环境调整
      

  2.   

    左边设一个带滚动条的文本框,用来输入英文字母。
    中间一个按钮,右边一个文本框。
    点击按钮把左边输入的英文字母的统计结果显示在右边的文本框。
    例如
    aabbAABB
    a:2个 
    b:2个
    A:2个
    B:2个
      

  3.   

    public class 字母个数
    { public static void main(String[] fdfd)
    {
    sum("asdASDasd&*(");
    }

    static void sum(String str)
    {
    HashMap hash = new HashMap();

    for(int i = 0;i < str.length();i++)
    {
    if(hash.containsKey(str.charAt(i)))
    {
    hash.put(str.charAt(i),(Integer)hash.get(str.charAt(i))+1);
    }
    else
    {
    hash.put(str.charAt(i),1);
    }
    }

    for (Iterator it = hash.entrySet().iterator(); it.hasNext(); )
       {
       Map.Entry entry = (Map.Entry) it.next();
       System.out.println(entry.getKey()+"---------"+entry.getValue());
      
       }
    }
    }S---------1
    d---------2
    D---------1
    A---------1
    a---------2
    s---------2简单写了个方法,顺序暂时不能排
    你就参考一下吧
    高手不要笑