You are previewing Java™ After Hours: 10 Projects You'll Never Do at Work.
O'Reilly logo
Java™ After Hours: 10 Projects You'll Never Do at Work

Book Description

Take your Java programming skills beyond the ordinary. Java After Hours: 10 Projects You'll Never Do at Work will make Java your playground with ten detailed projects that will have you exploring the various fields that Java offers to build exciting new programs. You'll learn to:

  • Create graphics interactively on Web servers

  • Send images to Web browsers

  • Tinker with Java's Swing package to make it do seemingly impossible things

  • Search websites and send e-mail from Java programs

  • Use multithreading, Ant and more!

Increase your Java arsenal by taking control of Java and explore its possibilities with Java After Hours.

Table of Contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. We Want to Hear from You!
  5. Introduction
  6. Making Fish Swim in the Multithreaded Aquarium
    1. Building the Aquarium
    2. Loading the Fish
    3. Moving Those Fish
    4. Double-Buffering the Drawing
    5. Creating the Fish
    6. Making the Fish Swim
    7. Drawing the Fish
    8. Conclusion
  7. Slapshot! The Interactive Hockey Game
    1. Creating the Rink
    2. Starting a Game
    3. Moving Those Pucks
    4. Getting the Pucks to Bounce Off Each Other
    5. How the Computer Blocks Pucks
    6. How the User Blocks Pucks
    7. Setting the Speed
    8. Creating the Pucks
    9. Conclusion
  8. The Graphicizer Image-Editing and Conversion Tool
    1. Creating the Graphicizer Window
    2. Opening an Image File
    3. Painting the Image
    4. Saving an Image File
    5. Embossing an Image
    6. Sharpening an Image
    7. Brightening an Image
    8. Blurring an Image
    9. Reducing an Image
    10. Undoing a Change
    11. Conclusion
  9. Creating Stunning Graphics with Painter
    1. Creating the Painter Window
    2. Handling Menu Selections
    3. Handling the Mouse
    4. Drawing Some Graphics
    5. Drawing Lines
    6. Drawing Ellipses
    7. Drawing Rectangles
    8. Drawing Rounded Rectangles
    9. Drawing Freehand
    10. Drawing Text
    11. Drawing the Final Image
    12. Setting Colors
    13. Conclusion
  10. Chatting on the Internet with the Chat Room
    1. Creating the Chat HTML Page
    2. Creating JSP Pages
    3. Getting the Tomcat Web Server
    4. Using Some Java in JSP
    5. Reading Data from HTML Controls in JSP
    6. Using Request Objects
    7. Using the Session and Application Objects
    8. Creating a Hit Counter Using Sessions
    9. Creating a Hit Counter Using Applications
    10. Displaying the Current User Comments
    11. Storing New Comments
    12. Conclusion
  11. Who's There? Logging Access to Your Website with WebLogger
    1. All About Filters
    2. Creating a Simple Filter
    3. Restricting Access Based on Time of Day
    4. Restricting Access Based on Password
    5. Creating WebLogger
    6. Conclusion
  12. Running Any Program Via Remote Control with the Robot
    1. Running the Robot
    2. Creating the Robot's Window
    3. Reading the Robot's Commands
    4. Executing Commands
    5. Making the Robot Reappear
    6. Conclusion
  13. Creating a Custom Web Browser in Java: The Browser Project
    1. Introducing the SWT
    2. Getting the SWT
    3. Creating an SWT Application
    4. Working with SWT Events
    5. Using SWT Toolbars
    6. Creating the Browser Project
    7. Conclusion
  14. Typing Across the Internet: The Intercom Project
    1. Using the Intercom
    2. Creating Intercom 1
    3. Creating Intercom 2
    4. Conclusion
  15. Getting a Graphical Weather Forecast: The Forecaster Project
    1. Creating the Forecaster JSP
    2. Creating the Desktop Version
    3. Conclusion
  16. Index