Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Show Your Code11-19-2010Opening Discussion●Minute essay comments:–Animations:●Kenny and Cartman●3-D shapes?●A dog.–Can we do animations and still have mouse and keyboard input?–Does the second project have to be in Eclipse?Show Your Code●Let's look at people's code.Animation●Animation is basically displaying one thing after another in rapid succession.●We just have to change something about the appearance in between.Timer●The javax.swing.Timer class gives us a way to have some code called at regular intervals.●The Timer needs an ActionListener, so we will make our class implement ActionListener.●This will require us to add an actionPerformed(ActionEvent e) method. This is where we will put the code we want to have happen.Loading Images●To load in images we can use the javax.imageio.ImageIO class.●It has a read method to read from a File, but that won't work in an Applet. (This is why I provided the main method for you.)●The read method that uses a URL will work, but only for certain URLs.Minute Essay●What questions do you have?●Quiz on
View Full Document