... have a class to handle action events, we need to return to our constructor and register our listeners.
Back to top
Step 7 - Registering our Event Listeners
Go up to the top of the file to our controller ... backwardButton1 = new BackwardButton( );
backwardButton1.setBounds(10,1,20 ,40 );
container.add(backwardButton1);
playPauseButton1 = new PlayPauseButton( );
playPauseButt...
... associate buttons, the forward
button, backward button, play/pause button, and the close box button.
4.
ForwardButton .java - based on RolloverButton, this file contains code for
behavior unique to the ... click on the
Files tab to get back to your list of files).
Intro to Java Programming - Setting Up the Project
http://developer.apple.com /java/ javatutorial/settingup.html...
... is
completed, proceed to the steps in the section Building the Play/Pause Button.
Back to top
Intro to Java Programming - Steps 2-6
http://developer.apple.com /java/ javatutorial/building02-06.html ... add the button to the dialog.
Back to top
Step 5 - Responding to button clicks from the okButton
Now that we have an OK button, we need to create a method that will respond...
... 2
http://developer.apple.com /java/ javatutorial/imagebutton2.html (4 of 15) [1/28/2000 1:32:08 PM]
Now that we have a mechanism for adding images to our pool of button images, we need
to be able to remove them.
Back to top
Step ... Listeners to tell the button they no longer need to be
notified when an ActionEvent is generated by this button.
Building the Image Button Part 2
htt...
... reserved.
Intro to Java Programming - Steps 7-10
http://developer.apple.com /java/ javatutorial/building07-10.html (2 of 2) [1/28/2000 1:26:13 PM]
Search
Shortcut
Steps to Follow
Back to top
Step ... similar to ForwardButton .java. Due to our architecture, this class is
fairly trivial. The next (and final) step in our series of button classes is to implement the
PlayPauseBut...
... time.
protected Vector files;
First, we declare a vector to store our image files that will be successively displayed as the slide show.
This vector is similar to the vector of images used by the button, but ... SlideShow constructor.
Back to top
Step 5 - Initializing the SlideShow’s State
Implementing the Slide Show
http://developer.apple.com /java/ javatutorial/slideshow.html (8 of 4...
... an
Inner Class to Handle Action Events) that we will use to handle these event. Then we add an action
listener to each class we want to be able to respond to. It is important to note that we ... Show
http://developer.apple.com /java/ javatutorial/slideshow.html (26 of 41 ) [1/28/2000 1:27:01 PM]
For the next step, we will implement our quit handler.
Back to top
Step 14 - Impl...
... file dialog in this class. To return
to the main tutorial file, click here.
Implementing the Slide Show
http://developer.apple.com /java/ javatutorial/slideshow.html (41 of 41 ) [1/28/2000 1:27:03 PM]
the ... individual button that sent the event. First, we set up a string variable
to store the action command of the button.
Implementing the Slide Show
http://developer.apple.com /java/...
... JBindery to create a double-clickable Macintosh
application.
Back to top
Previous Section Table of Contents Next Section
Intro to Java Programming - Summary
http://developer.apple.com /java/ javatutorial/summary.html ... reserved.
Intro to Java Programming - Where to Go From Here
http://developer.apple.com /java/ javatutorial/where.html (2 of 2) [1/28/2000 1:27:17 PM]
Se...