voxforge.org
VoxForge Dev

Changeset 2348

Show
Ignore:
Timestamp:
11/08/07 23:32:43 (10 months ago)
Author:
kmaclean
Message:

isolate all label names in speechrecorder

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java

    r2329 r2348  
    260260    String promptID9; 
    261261    String promptID10;   
    262  
     262// !!!!!! 
    263263    JTextField usernameTextField;   
    264     
     264 
     265    String usernamePanelLabel = "Username:"; 
    265266    String userName; 
     267     
    266268    String copyrightName = "Free Software Foundation"; 
    267269    String gplAccepted = "Yes"; 
     
    270272    public static final String notApplicable = "unknown"; 
    271273     
     274    String genderPanelLabel = "Gender:"; 
     275    JComboBox genderChooser;        
     276    public static final String male = "Male";     
     277    public static final String female = "Female"; 
     278    String gender = notApplicable; 
     279     
     280    String ageRangePanelLabel = "Age Range:"; 
    272281    JComboBox ageRangeChooser;  
    273282    public static final String youth = "Youth";   
     
    275284    public static final String senior = "Senior";  
    276285    String ageRange = notApplicable; 
    277      
    278     JComboBox genderChooser;        
    279     public static final String male = "Male";     
    280     public static final String female = "Female"; 
    281     String gender = notApplicable; 
    282      
     286 
     287    String dialectPanelLabel = "Pronunciation Dialect:"; 
    283288    JComboBox dialectChooser;      
    284289    public static final String australian = "Australian English";     
     
    292297    String dialect = notApplicable; 
    293298     
     299    String microphonePanelLabel = "Microphone Type:"; 
    294300    JComboBox microphoneChooser;      
    295301    public static final String headset = "Headset mic";     
     
    299305    public static final String studio = "Studio mic";  
    300306    public static final String otherMic = "Other";  
    301     String microphone = notApplicable;     
     307    String microphone = notApplicable;   
     308     
     309    String uploadText = "<html>By clicking the \"Upload\" button, you agree to assign the Copyright to your recorded speech to <br> " 
     310        + "the Free Software Foundation, and to license your submission under the GNU Public Licence (\"GPL\"):" ; 
     311    String uploadButtonLabel = "Upload"; 
     312     
     313    String moreInfoText = "For more information on Copyright and GPL, click here:"; 
     314    String moreInfoButtonLabel = "More Information";     
     315 
     316    String disclaimerText =  
     317         "<html>VoxForge SpeechSubmission Applet - Copyright (C) 2007 VoxForge<br>" 
     318         +"This program comes with ABSOLUTELY NO WARRANTY; without even the implied<br> " 
     319         +"warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  For<br>"  
     320         +"more details click the \"About\" button:"; 
     321    String aboutButtonLabel = "About"; 
     322     
     323    public static final String recordButton = "Record";  
     324    public static final String stopButton = "Stop";  
     325    public static final String playButton = "Play";  
    302326// !!!!!!       
     327     
     328     
    303329    String fileFieldName; 
    304330     
    305     JComboBox compressionChooser; 
    306      
    307     public static final String comp1 = "Smaller file, low quality"; 
    308     public static final String comp2 = "Standard"; 
    309     public static final String comp3 = "Higher quality, larger file"; 
    310  
    311331    URL endPageURL; 
    312332    URL helpPageURL; 
     
    392412                // Create a single WAV file that will hold our recordings 
    393413                try { 
    394                         wavFile = File.createTempFile("mdl", ".wav"); 
    395                         wavFile.deleteOnExit(); 
    396 // !!!!!! 
    397414                        wavFile1 = new File(tempdir + "wavFile1.wav"); 
    398415                        wavFile1.deleteOnExit(); 
     
    436453                        uploadWavFile10 = new File(tempdir + this.promptID10 + ".wav"); 
    437454                        uploadWavFile10.deleteOnExit();                  
    438 //                      archiveFile = File.createTempFile("vxf", ".zip"); 
    439 //                      archiveFile.deleteOnExit();      
    440455                        promptsFile = new File(tempdir + "prompts.txt");                         
    441456                        promptsFile.deleteOnExit();              
     
    446461                        licenseNoticeFile = new File(tempdir + "license.txt");   
    447462                        licenseFile.deleteOnExit();      
    448 // !!!!!!                        
    449463                } catch (Exception e) { 
    450464                        System.err.println("Unable to create WAV cache file for storing audio\n" + e); 
    451465                        return; 
    452466                } 
    453         // !!!!!! 
    454    
    455                 System.err.println("CapturePlayback's WAV file for recording is: " + wavFile); 
    456467                System.err.println("CapturePlayback's WAV file for recording wavFile1 is:" + wavFile1); 
    457468                System.err.println("CapturePlayback's WAV file for recording wavFile2 is:" + wavFile2); 
     
    488499         JPanel usernamePanel = new JPanel(); 
    489500         usernamePanel.setLayout(new FlowLayout(FlowLayout.CENTER));  
    490          usernamePanel.add(new JLabel("Username:")); 
     501         usernamePanel.add(new JLabel(usernamePanelLabel)); 
    491502         usernamePanel.add(usernameTextField = new JTextField(20)); 
    492          usernamePanel.add(new JLabel("(leave blank to submit anonymously)"));      
     503          
     504         String usernamePanelText = "(leave blank to submit anonymously)"; 
     505         usernamePanel.add(new JLabel(usernamePanelText));      
    493506          
    494507         p2.add(usernamePanel);   
     
    497510        genderPanel.setLayout(new FlowLayout(FlowLayout.CENTER));   
    498511 
    499         genderPanel.add(new JLabel("Gender:")); 
     512        genderPanel.add(new JLabel(genderPanelLabel)); 
    500513        String[] genderSelection = {pleaseSelect,male, female}; 
    501514        genderPanel.add(genderChooser = new JComboBox(genderSelection)); 
     
    520533        JPanel ageRangePanel = new JPanel(); 
    521534        ageRangePanel.setLayout(new FlowLayout(FlowLayout.CENTER));   
    522         ageRangePanel.add(new JLabel("Age Range:")); 
     535        ageRangePanel.add(new JLabel(ageRangePanelLabel)); 
    523536        String[] ageSelection = {pleaseSelect, youth, adult, senior}; 
    524537        ageRangePanel.add(ageRangeChooser = new JComboBox(ageSelection)); 
     
    544557        JPanel dialectPanel = new JPanel(); 
    545558        dialectPanel.setLayout(new FlowLayout(FlowLayout.CENTER)); 
    546         dialectPanel.add(new JLabel("Pronunciation Dialect:")); 
     559        dialectPanel.add(new JLabel(dialectPanelLabel)); 
    547560        String[] dialectSelection = {pleaseSelect,australian, american, british, canadian, european, newzealand, southafrican, otherDialect}; 
    548561        dialectPanel.add(dialectChooser = new JComboBox(dialectSelection)); 
     
    574587                 } 
    575588                 }); 
    576         dialectPanel.add(new JLabel("(mother tongue)"));  
    577589        p2.add(dialectPanel); 
    578590 
     
    580592        JPanel microphonePanel = new JPanel(); 
    581593        microphonePanel.setLayout(new FlowLayout(FlowLayout.CENTER)); 
    582         microphonePanel.add(new JLabel("Microphone Type:")); 
     594        microphonePanel.add(new JLabel(microphonePanelLabel)); 
    583595        String[] microphonetSelection = {pleaseSelect,headset, desktopBoom, laptopBuiltin, webcam, studio, otherMic}; 
    584596        microphonePanel.add(microphoneChooser = new JComboBox(microphonetSelection)); 
     
    615627//      ############ Prompts panel ####################################          
    616628        JPanel prompts = new JPanel();  
    617     //    prompts.add(new JLabel("Prompts:")); 
    618629        prompts.setLayout(new BoxLayout(prompts, BoxLayout.Y_AXIS)); 
    619630        Color voxforgeColour    = new Color(197, 216, 234); 
     
    626637        prompt1InnerPanel.add(new JLabel(this.prompt1)); 
    627638        prompt1Panel.add(prompt1InnerPanel); 
    628         play1 = addButton("Play", prompt1Panel, false); 
     639        play1 = addButton(playButton, prompt1Panel, false); 
    629640        play1.setSize(10,10); 
    630         capt1 = addButton("Record", prompt1Panel, true); 
     641        capt1 = addButton(recordButton, prompt1Panel, true); 
    631642        prompts.add(prompt1Panel); 
    632643// ############ Prompt2 ####################################             
     
    637648        prompt2InnerPanel.add(new JLabel(this.prompt2)); 
    638649        prompt2Panel.add(prompt2InnerPanel); 
    639         play2 = addButton("Play", prompt2Panel, false); 
    640         capt2 = addButton("Record", prompt2Panel, false); 
     650        play2 = addButton(playButton, prompt2Panel, false); 
     651        capt2 = addButton(recordButton, prompt2Panel, false); 
    641652        prompts.add(prompt2Panel);         
    642653//      ############ Prompt3 ####################################             
     
    647658        prompt3InnerPanel.add(new JLabel(this.prompt3)); 
    648659        prompt3Panel.add(prompt3InnerPanel); 
    649         play3 = addButton("Play", prompt3Panel, false); 
    650         capt3 = addButton("Record", prompt3Panel, false); 
     660        play3 = addButton(playButton, prompt3Panel, false); 
     661        capt3 = addButton(recordButton, prompt3Panel, false); 
    651662        prompts.add(prompt3Panel);      
    652663//      ############ Prompt4 ####################################             
     
    657668        prompt4InnerPanel.add(new JLabel(this.prompt4)); 
    658669        prompt4Panel.add(prompt4InnerPanel);      
    659         play4 = addButton("Play", prompt4Panel, false); 
    660         capt4 = addButton("Record", prompt4Panel, false); 
     670        play4 = addButton(playButton, prompt4Panel, false); 
     671        capt4 = addButton(recordButton, prompt4Panel, false); 
    661672        prompts.add(prompt4Panel);      
    662673//      ############ Prompt5 ####################################             
     
    667678        prompt5InnerPanel.add(new JLabel(this.prompt5)); 
    668679        prompt5Panel.add(prompt5InnerPanel); 
    669         play5 = addButton("Play", prompt5Panel, false); 
    670         capt5 = addButton("Record", prompt5Panel, false); 
     680        play5 = addButton(playButton, prompt5Panel, false); 
     681        capt5 = addButton(recordButton, prompt5Panel, false); 
    671682        prompts.add(prompt5Panel);  
    672683 
     
    678689        prompt6InnerPanel.add(new JLabel(this.prompt6)); 
    679690        prompt6Panel.add(prompt6InnerPanel); 
    680         play6 = addButton("Play", prompt6Panel, false); 
     691        play6 = addButton(playButton, prompt6Panel, false); 
    681692        play6.setSize(10,10); 
    682         capt6 = addButton("Record", prompt6Panel, false); 
     693        capt6 = addButton(recordButton, prompt6Panel, false); 
    683694        prompts.add(prompt6Panel); 
    684695// ############ prompt7 ####################################             
     
    689700        prompt7InnerPanel.add(new JLabel(this.prompt7)); 
    690701        prompt7Panel.add(prompt7InnerPanel); 
    691         play7 = addButton("Play", prompt7Panel, false); 
    692         capt7 = addButton("Record", prompt7Panel, false); 
     702        play7 = addButton(playButton, prompt7Panel, false); 
     703        capt7 = addButton(recordButton, prompt7Panel, false); 
    693704        prompts.add(prompt7Panel);         
    694705//      ############ prompt8 ####################################             
     
    699710        prompt8InnerPanel.add(new JLabel(this.prompt8)); 
    700711        prompt8Panel.add(prompt8InnerPanel); 
    701         play8 = addButton("Play", prompt8Panel, false); 
    702         capt8 = addButton("Record", prompt8Panel, false); 
     712        play8 = addButton(playButton, prompt8Panel, false); 
     713        capt8 = addButton(recordButton, prompt8Panel, false); 
    703714        prompts.add(prompt8Panel);      
    704715//      ############ prompt9 ####################################             
     
    709720        prompt9InnerPanel.add(new JLabel(this.prompt9)); 
    710721        prompt9Panel.add(prompt9InnerPanel);      
    711         play9 = addButton("Play", prompt9Panel, false); 
    712         capt9 = addButton("Record", prompt9Panel, false); 
     722        play9 = addButton(playButton, prompt9Panel, false); 
     723        capt9 = addButton(recordButton, prompt9Panel, false); 
    713724        prompts.add(prompt9Panel);      
    714725//      ############ prompt10 ####################################             
     
    719730        prompt10InnerPanel.add(new JLabel(this.prompt10)); 
    720731        prompt10Panel.add(prompt10InnerPanel); 
    721         play10 = addButton("Play", prompt10Panel, false); 
    722         capt10 = addButton("Record", prompt10Panel, false); 
     732        play10 = addButton(playButton, prompt10Panel, false); 
     733        capt10 = addButton(recordButton, prompt10Panel, false); 
    723734        prompts.add(prompt10Panel);  
    724735        promptsContainer.add(prompts); 
     
    735746        p2.add(samplingPanel); 
    736747//      ############ Upload Text ####################################              
    737         JPanel UploadTextPanel = new JPanel(); 
    738         String text = "<html>By clicking the \"Upload\" button, you agree to assign the Copyright to your recorded speech to <br> " 
    739            + "the Free Software Foundation, and to license your submission under the GNU Public Licence (\"GPL\"):" ; 
    740         UploadTextPanel.add(new JLabel(text));                
    741         p2.add(UploadTextPanel); 
     748        JPanel uploadTextPanel = new JPanel(); 
     749        uploadTextPanel.add(new JLabel(uploadText));                
     750        p2.add(uploadTextPanel); 
    742751//############ Upload ####################################           
    743          JPanel UploadButtonPanel = new JPanel(); 
    744          UploadButtonPanel.setBorder(new EmptyBorder(5,0,5,0)); 
    745          uploadB = addButton("Upload", UploadButtonPanel, false); // upload all submissions 
    746          p2.add(UploadButtonPanel); 
     752         JPanel uploadButtonPanel = new JPanel(); 
     753         uploadButtonPanel.setBorder(new EmptyBorder(5,0,5,0)); 
     754         uploadB = addButton(uploadButtonLabel, uploadButtonPanel, false); // upload all submissions 
     755         p2.add(uploadButtonPanel); 
    747756//############ Upload Progress bar #################################### 
    748757         progBar = new JProgressBar(); 
     
    753762// ############ More Information Button ####################################           
    754763         JPanel moreInfoButtonPanel = new JPanel(); 
    755    //      moreInfoButtonPanel.setBorder(new EmptyBorder(25,0,35,0)); 
    756          moreInfoButtonPanel.add(new JLabel("For more information on Copyright and GPL, click here:")); 
    757          moreInfoB = addButton("More Information", moreInfoButtonPanel, true);  
     764         moreInfoButtonPanel.add(new JLabel(moreInfoText)); 
     765         moreInfoB = addButton(moreInfoButtonLabel, moreInfoButtonPanel, true);  
    758766         p2.add(moreInfoButtonPanel);    
    759767// ############ Disclaimer ####################################   
     
    761769         DisclaimerPanel.setLayout(new FlowLayout(FlowLayout.CENTER));  
    762770         JPanel DisclaimerInnerPanel = new JPanel();  
    763          String DisclaimerText =  
    764                  "<html>VoxForge SpeechSubmission Applet - Copyright (C) 2007 VoxForge<br>" 
    765                  +"This program comes with ABSOLUTELY NO WARRANTY; without even the implied<br> " 
    766                  +"warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  For<br>"  
    767                  +"more details click the \"About\" button:"; 
    768          DisclaimerInnerPanel.add(new JLabel(DisclaimerText)); 
    769          aboutB = addButton("About", DisclaimerInnerPanel, true);  
     771         DisclaimerInnerPanel.add(new JLabel(disclaimerText)); 
     772         aboutB = addButton(aboutButtonLabel, DisclaimerInnerPanel, true);  
    770773         DisclaimerInnerPanel.setBorder(BorderFactory.createLineBorder (voxforgeColour, 3)); 
    771774  
     
    916919// ################### Play #######################################             
    917920        else if (obj.equals(playB)) {   
    918             if (playB.getText().startsWith("Play")) { 
     921            if (playB.getText().startsWith(playButton)) { 
    919922                playback.start(); 
    920923                samplingGraph.start(); 
    921924                captB.setEnabled(false); 
    922925                pausB.setEnabled(true); 
    923                 playB.setText("Stop"); 
     926                playB.setText(stopButton); 
    924927            } else { 
    925928                playback.stop(); 
     
    927930                captB.setEnabled(true); 
    928931                pausB.setEnabled(false); 
    929                 playB.setText("Play"); 
     932                playB.setText(playButton); 
    930933            } 
    931934        } 
    932935// !!!!!! 
    933936        else if (obj.equals(play1)) { 
    934             if (play1.getText().startsWith("Play")) { 
     937            if (play1.getText().startsWith(playButton)) { 
    935938                wavFile = wavFile1;  // !!!!!!       
    936939                duration = duration1; 
     
    939942                samplingGraph.start(); 
    940943                capt1.setEnabled(false); 
    941                 play1.setText("Stop"); 
     944                play1.setText(stopButton); 
    942945            } else { 
    943946                playback.stop(); 
    944947                samplingGraph.stop(); 
    945948                capt1.setEnabled(true); 
    946                 play1.setText("Play"); 
     949                play1.setText(playButton); 
    947950            } 
    948951        }    
    949952        else if (obj.equals(play2)) { 
    950             if (play2.getText().startsWith("Play")) { 
     953            if (play2.getText().startsWith(playButton)) { 
    951954                wavFile = wavFile2;  // !!!!!!                   
    952955                duration = duration2;   
     
    955958                samplingGraph.start(); 
    956959                capt2.setEnabled(false); 
    957                 play2.setText("Stop"); 
     960                play2.setText(stopButton); 
    958961            } else { 
    959962                playback.stop(); 
    960963                samplingGraph.stop(); 
    961964                capt2.setEnabled(true); 
    962                 play2.setText("Play"); 
     965                play2.setText(playButton); 
    963966            } 
    964967        }     
    965968        else if (obj.equals(play3)) { 
    966             if (play3.getText().startsWith("Play")) { 
     969            if (play3.getText().startsWith(playButton)) { 
    967970                wavFile = wavFile3;  // !!!!!!                   
    968971                playback.start(); 
     
    971974                samplingGraph.start(); 
    972975                capt3.setEnabled(false); 
    973                 play3.setText("Stop"); 
     976                play3.setText(stopButton); 
    974977            } else { 
    975978                playback.stop(); 
    976979                samplingGraph.stop(); 
    977980                capt3.setEnabled(true); 
    978                 play3.setText("Play"); 
     981                play3.setText(playButton); 
    979982            } 
    980983        }    
    981984        else if (obj.equals(play4)) { 
    982             if (play4.getText().startsWith("Play")) { 
     985            if (play4.getText().startsWith(playButton)) { 
    983986                wavFile = wavFile4;  // !!!!!!                   
    984987                duration = duration4; 
     
    987990                samplingGraph.start(); 
    988991                capt4.setEnabled(false); 
    989                 play4.setText("Stop"); 
     992                play4.setText(stopButton); 
    990993            } else { 
    991994                playback.stop(); 
    992995                samplingGraph.stop(); 
    993996                capt4.setEnabled(true); 
    994                 play4.setText("Play"); 
     997                play4.setText(playButton); 
    995998            } 
    996999        }    
    9971000        else if (obj.equals(play5)) { 
    998             if (play5.getText().startsWith("Play")) { 
     1001            if (play5.getText().startsWith(playButton)) { 
    9991002                wavFile = wavFile5;  // !!!!!!                   
    10001003                duration = duration5; 
     
    10031006                samplingGraph.start(); 
    10041007                capt5.setEnabled(false); 
    1005                 play5.setText("Stop"); 
     1008                play5.setText(stopButton); 
    10061009            } else { 
    10071010                playback.stop(); 
    10081011                samplingGraph.stop(); 
    10091012                capt5.setEnabled(true); 
    1010                 play5.setText("Play"); 
     1013                play5.setText(playButton); 
    10111014            } 
    10121015        }      
    10131016        else if (obj.equals(play6)) { 
    1014             if (play6.getText().startsWith("Play")) { 
     1017            if (play6.getText().startsWith(playButton)) { 
    10151018                wavFile = wavFile6;  // !!!!!!                   
    10161019                duration = duration6; 
     
    10191022                samplingGraph.start(); 
    10201023                capt6.setEnabled(false); 
    1021                 play6.setText("Stop"); 
     1024                play6.setText(stopButton); 
    10221025            } else { 
    10231026                playback.stop(); 
    10241027                samplingGraph.stop(); 
    10251028                capt6.setEnabled(true); 
    1026                 play6.setText("Play"); 
     1029                play6.setText(playButton); 
    10271030            } 
    10281031        }    
    10291032        else if (obj.equals(play7)) { 
    1030             if (play7.getText().startsWith("Play")) { 
     1033            if (play7.getText().startsWith(playButton)) { 
    10311034                wavFile = wavFile7;  // !!!!!!                   
    10321035                duration = duration7; 
     
    10351038                samplingGraph.start(); 
    10361039                capt7.setEnabled(false); 
    1037                 play7.setText("Stop"); 
     1040                play7.setText(stopButton); 
    10381041            } else { 
    10391042                playback.stop(); 
    10401043                samplingGraph.stop(); 
    10411044                capt7.setEnabled(true); 
    1042                 play7.setText("Play"); 
     1045                play7.setText(playButton); 
    10431046            } 
    10441047        }     
    10451048        else if (obj.equals(play8)) { 
    1046             if (play8.getText().startsWith("Play")) { 
     1049            if (play8.getText().startsWith(playButton)) { 
    10471050                wavFile = wavFile8;  // !!!!!!                   
    10481051                duration = duration8; 
     
    10511054                samplingGraph.start(); 
    10521055                capt8.setEnabled(false); 
    1053                 play8.setText("Stop"); 
     1056                play8.setText(stopButton); 
    10541057            } else { 
    10551058                playback.stop(); 
    10561059                samplingGraph.stop(); 
    10571060                capt8.setEnabled(true); 
    1058                 play8.setText("Play"); 
     1061                play8.setText(playButton); 
    10591062            } 
    10601063        }    
    10611064        else if (obj.equals(play9)) { 
    1062             if (play9.getText().startsWith("Play")) { 
     1065            if (play9.getText().startsWith(playButton)) { 
    10631066                wavFile = wavFile9;  // !!!!!!                   
    10641067                duration = duration9; 
     
    10671070                samplingGraph.start(); 
    10681071                capt9.setEnabled(false); 
    1069                 play9.setText("Stop"); 
     1072                play9.setText(stopButton); 
    10701073            } else { 
    10711074                playback.stop(); 
    10721075                samplingGraph.stop(); 
    10731076                capt9.setEnabled(true); 
    1074                 play9.setText("Play"); 
     1077                play9.setText(playButton); 
    10751078            } 
    10761079        }    
    10771080        else if (obj.equals(play10)) { 
    1078             if (play10.getText().startsWith("Play")) { 
     1081            if (play10.getText().startsWith(playButton)) { 
    10791082                wavFile = wavFile10;  // !!!!!!                  
    10801083                duration = duration10; 
     
    10831086                samplingGraph.start(); 
    10841087                capt10.setEnabled(false); 
    1085                 play10.setText("Stop"); 
     1088                play10.setText(stopButton); 
    10861089            } else { 
    10871090                playback.stop(); 
    10881091                samplingGraph.stop(); 
    10891092                capt10.setEnabled(true); 
    1090                 play10.setText("Play"); 
     1093                play10.setText(playButton); 
    10911094            } 
    10921095        }            
     
    11081111//temp hidden                aiffB.setEnabled(false); 
    11091112//temp hidden                waveB.setEnabled(false); 
    1110                 captB.setText("Stop"); 
     1113                captB.setText(stopButton); 
    11111114            } else { 
    11121115                lines.removeAllElements();   
     
    11271130// !!!!!!         
    11281131      else if (obj.equals(capt1)) { 
    1129         if (capt1.getText().startsWith("Record")) { 
     1132        if (capt1.getText().startsWith(recordButton)) { 
    11301133            file = null; 
    11311134            wavFile = wavFile1;   
     
    11411144            // play1.setEnabled(false); 
    11421145            // !!!!!! 
    1143             capt1.setText("Stop"); 
     1146            capt1.setText(stopButton); 
    11441147            moreInfoB.setEnabled(false);   
    11451148            aboutB.setEnabled(false);  
     
    11501153            restoreButtonState(); //!!!!!! 
    11511154            play1.setEnabled(true); 
    1152             capt1.setText("Record"); 
     1155            capt1.setText(recordButton); 
    11531156            moreInfoB.setEnabled(true);   
    11541157            aboutB.setEnabled(true);  
     
    11711174              // play2.setEnabled(false); 
    11721175              // !!!!!! 
    1173               capt2.setText("Stop"); 
     1176              capt2.setText(stopButton); 
    11741177              moreInfoB.setEnabled(false); 
    11751178              aboutB.setEnabled(false);  
     
    11801183              restoreButtonState(); //!!!!!! 
    11811184              play2.setEnabled(true); 
    1182               capt2.setText("Record"); 
     1185              capt2.setText(recordButton); 
    11831186              moreInfoB.setEnabled(true); 
    11841187              aboutB.setEnabled(true);  
     
    11871190        }     
    11881191      else if (obj.equals(capt3)) { 
    1189           if (capt3.getText().startsWith("Record")) { 
     1192          if (capt3.getText().startsWith(recordButton)) { 
    11901193              file = null; 
    11911194              wavFile = wavFile3;  
     
    12011204              // play3.setEnabled(false); 
    12021205              // !!!!!! 
    1203               capt3.setText("Stop"); 
     1206              capt3.setText(stopButton); 
    12041207              moreInfoB.setEnabled(false); 
    12051208              aboutB.setEnabled(false);  
     
    12101213              restoreButtonState(); //!!!!!! 
    12111214              play3.setEnabled(true); 
    1212               capt3.setText("Record"); 
     1215              capt3.setText(recordButton); 
    12131216              moreInfoB.setEnabled(true); 
    12141217              aboutB.setEnabled(true);  
     
    12181221        }  
    12191222      else if (obj.equals(capt4)) { 
    1220           if (capt4.getText().startsWith("Record")) { 
     1223          if (capt4.getText().startsWith(recordButton)) { 
    12211224              file = null; 
    12221225              wavFile = wavFile4;               
     
    12321235              // play4.setEnabled(false); 
    12331236              // !!!!!! 
    1234               capt4.setText("Stop"); 
     1237              capt4.setText(stopButton); 
    12351238              moreInfoB.setEnabled(false);   
    12361239              aboutB.setEnabled(false);                
     
    12411244              restoreButtonState(); //!!!!!! 
    12421245              play4.setEnabled(true); 
    1243               capt4.setText("Record"); 
     1246              capt4.setText(recordButton); 
    12441247              moreInfoB.setEnabled(true); 
    12451248              aboutB.setEnabled(true);  
     
    12491252        }  
    12501253      else if (obj.equals(capt5)) { 
    1251           if (capt5.getText().startsWith("Record")) { 
     1254          if (capt5.getText().startsWith(recordButton)) { 
    12521255              file = null; 
    12531256              wavFile = wavFile5;                
     
    12631266              // play5.setEnabled(false); 
    12641267              // !!!!!! 
    1265               capt5.setText("Stop"); 
     1268              capt5.setText(stopButton); 
    12661269              moreInfoB.setEnabled(false); 
    12671270              aboutB.setEnabled(false);  
     
    12721275              restoreButtonState(); //!!!!!! 
    12731276              play5.setEnabled(true); 
    1274               capt5.setText("Record"); 
     1277              capt5.setText(recordButton); 
    12751278              moreInfoB.setEnabled(true); 
    12761279              aboutB.setEnabled(true);  
     
    12801283        }     
    12811284      else if (obj.equals(capt6)) { 
    1282           if (capt6.getText().startsWith("Record")) { 
     1285          if (capt6.getText().startsWith(recordButton)) { 
    12831286              file = null; 
    12841287              wavFile = wavFile6;   
     
    12941297              // play6.setEnabled(false); 
    12951298              // !!!!!! 
    1296               capt6.setText("Stop"); 
     1299              capt6.setText(stopButton); 
    12971300              moreInfoB.setEnabled(false);   
    12981301              aboutB.setEnabled(false);  
     
    13031306              restoreButtonState(); //!!!!!! 
    13041307              play6.setEnabled(true); 
    1305               capt6.setText("Record"); 
     1308              capt6.setText(recordButton); 
    13061309              moreInfoB.setEnabled(true); 
    13071310              aboutB.setEnabled(true);  
     
    13101313        }  
    13111314        else if (obj.equals(capt7)) { 
    1312             if (capt7.getText().startsWith("Record")) { 
     1315            if (capt7.getText().startsWith(recordButton)) { 
    13131316                file = null; 
    13141317                wavFile = wavFile7;      
     
    13241327                // play7.setEnabled(false); 
    13251328                // !!!!!! 
    1326                 capt7.setText("Stop"); 
     1329                capt7.setText(stopButton); 
    13271330                moreInfoB.setEnabled(false);   
    13281331                aboutB.setEnabled(false);   
     
    13331336                restoreButtonState(); //!!!!!! 
    13341337                play7.setEnabled(true); 
    1335                 capt7.setText("Record"); 
     1338                capt7.setText(recordButton); 
    13361339                moreInfoB.setEnabled(true); 
    13371340                aboutB.setEnabled(true);  
     
    13401343          }     
    13411344        else if (obj.equals(capt8)) { 
    1342             if (capt8.getText().startsWith("Record")) { 
     1345            if (capt8.getText().startsWith(recordButton)) { 
    13431346                file = null; 
    13441347                wavFile = wavFile8;   
     
    13541357                // play8.setEnabled(false); 
    13551358                // !!!!!! 
    1356                 capt8.setText("Stop"); 
     1359                capt8.setText(stopButton); 
    13571360                moreInfoB.setEnabled(false);   
    13581361                aboutB.setEnabled(false);  
     
    13631366                restoreButtonState(); //!!!!!! 
    13641367                play8.setEnabled(true); 
    1365                 capt8.setText("Record"); 
     1368                capt8.setText(recordButton); 
    13661369                moreInfoB.setEnabled(true); 
    13671370                aboutB.setEnabled(true);  
     
    13701373          }  
    13711374        else if (obj.equals(capt9)) { 
    1372             if (capt9.getText().startsWith("Record")) { 
     1375            if (capt9.getText().startsWith(recordButton)) { 
    13731376                file = null; 
    13741377                wavFile = wavFile9;    
     
    13841387                // play9.setEnabled(false); 
    13851388                // !!!!!! 
    1386                 capt9.setText("Stop"); 
     1389                capt9.setText(stopButton); 
    13871390                moreInfoB.setEnabled(false);  
    13881391                aboutB.setEnabled(false);  
     
    13931396                restoreButtonState(); //!!!!!! 
    13941397                play9.setEnabled(true); 
    1395                 capt9.setText("Record"); 
     1398                capt9.setText(recordButton); 
    13961399                moreInfoB.setEnabled(true);   
    13971400                aboutB.setEnabled(true);  
     
    14001403          }  
    14011404        else if (obj.equals(capt10)) { 
    1402             if (capt10.getText().startsWith("Record")) { 
     1405            if (capt10.getText().startsWith(recordButton)) { 
    14031406                file = null; 
    14041407                wavFile = wavFile10;     
     
    14141417                // play10.setEnabled(false); 
    14151418                // !!!!!! 
    1416                 capt10.setText("Stop"); 
     1419                capt10.setText(stopButton); 
    14171420                moreInfoB.setEnabled(false);   
    14181421                aboutB.setEnabled(false);  
     
    14231426                restoreButtonState(); //!!!!!! 
    14241427                play10.setEnabled(true); 
    1425                 capt10.setText("Record"); 
     1428                capt10.setText(recordButton); 
    14261429                moreInfoB.setEnabled(true);   
    14271430                aboutB.setEnabled(true);  
     
    16801683                samplingGraph.stop(); 
    16811684// !!!!!!        FIXME          
    1682               if (play1.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1685              if (play1.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16831686                  capt1.setEnabled(true);  
    1684               } else if (play2.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1687              } else if (play2.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16851688                  capt2.setEnabled(true);  
    1686               }else if (play3.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1689              }else if (play3.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16871690                  capt3.setEnabled(true);  
    1688               }else if (play4.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1691              }else if (play4.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16891692                  capt4.setEnabled(true);  
    1690               }else if (play5.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1693              }else if (play5.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16911694                  capt5.setEnabled(true);  
    1692               }else if (play6.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1695              }else if (play6.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16931696                  capt6.setEnabled(true);  
    1694               }else if (play7.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1697              }else if (play7.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16951698                  capt7.setEnabled(true);  
    1696               }else if (play8.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1699              }else if (play8.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16971700                  capt8.setEnabled(true);  
    1698               }else if (play9.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1701              }else if (play9.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    16991702                  capt9.setEnabled(true);  
    1700               }else if (play10.getText().startsWith("Stop")) { //play button gets set to "Stop" after play is pressed 
     1703              }else if (play10.getText().startsWith(stopButton)) { //play button gets set to "Stop" after play is pressed 
    17011704                  capt10.setEnabled(true);  
    17021705              } 
    17031706               
    1704               play1.setText("Play"); 
    1705               play2.setText("Play"); 
    1706               play3.setText("Play"); 
    1707               play4.setText("Play"); 
    1708               play5.setText("Play");      
    1709               play6.setText("Play"); 
    1710               play7.setText("Play"); 
    1711               play8.setText("Play"); 
    1712               play9.setText("Play"); 
    1713               play10.setText("Play");  
     1707              play1.setText(playButton); 
     1708              play2.setText(playButton); 
     1709              play3.setText(playButton); 
     1710              play4.setText(playButton); 
     1711              play5.setText(playButton);      
     1712              play6.setText(playButton); 
     1713              play7.setText(playButton); 
     1714              play8.setText(playButton); 
     1715              play9.setText(playButton); 
     1716              play10.setText(playButton);  
    17141717//            !!!!!!                
    17151718            }  
     
    18751878                playB.setEnabled(true); 
    18761879                waveB.setEnabled(true); 
    1877                 captB.setText("Record"); 
     1880                captB.setText(recordButton); 
    18781881                System.err.println(errStr); 
    18791882                samplingGraph.repaint();