1306 Java Media Framework and Java Sound (Web site construction) (on
1306 Java Media Framework and Java Sound (on CD) Chapter 22 313 } // end ActionListener 314 315 ); // end call to method addActionListener 316 317 buttonPanel.add( saveButton ); 318 saveButton.setEnabled( false ); 319 320 } // end method makePlaySaveButtons 321 322 // make recording button 323 private void makeRecordButton() 324 { 325 recordButton = new JButton( “Record” ); 326 327 // register an ActionListener for recordButton events 328 recordButton.addActionListener( 329 330 // anonymous inner class to handle recordButton events 331 new ActionListener() { 332 333 // start or stop recording 334 public void actionPerformed( ActionEvent event ) 335 { 336 // record MIDI when button is “record” button 337 if ( recordButton.getText().equals(”Record”) ) { 338 339 if ( midiRecord == null ) { 340 341 // create new instance of recorder 342 // by passing in synthesizer transmitter 343 midiRecord = new MidiRecord( 344 midiSynthesizer.getTransmitter() ); 345 346 if ( midiRecord.initialize() == false ) 347 return; 348 } 349 350 else 351 midiRecord.makeTrack(); 352 353 midiRecord.startRecord(); 354 355 // disable playback during recording 356 playButton.setEnabled( false ); 357 358 // change recording button to stop 359 recordButton.setText( “Stop” ); 360 recording = true; 361 362 } // end if 363 Fig. 22.10 MidiDemoprovides the GUI than enables users to interact with the application (part 7 of 14).
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.