private void jList2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList2MouseClicked
    jList2 = (JList) evt.getSource();
        if (evt.getClickCount() == 2) {
          int index = jList2.locationToIndex(evt.getPoint());
          if (index >= 0) {
            String s = (String) jList2.getModel().getElementAt(index);
           // MainFrame frame = new MainFrame();
           // MainFrame f = new MainFrame(s);
            String toLowerCase=" ";
            boolean val=false;
            if(!jTextArea1.getText().isEmpty()){
             System.out.println( jTextArea1.getText().charAt(0));
            if(Character.isLowerCase( jTextArea1.getText().charAt(0))){
                    toLowerCase = s.toLowerCase();
                    val=true;
                    //System.out.println(toLowerCase);
            }
            
            }
            if(!val){
            if(c==0)
            jTextArea1.append(s);
            else
            jTextArea1.append(" "+s);
            c++;
            }
            else{
            if(c==0)
            jTextArea1.append(toLowerCase);
            else
            jTextArea1.append(" "+toLowerCase);
            c++;
            }
          }
        }  
    }//GEN-LAST:event_jList2MouseClicked