ebook img

Java Homework Projects: A NetBeans GUI Swing Programming Tutorial PDF

957 Pages·2017·15.45 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Java Homework Projects: A NetBeans GUI Swing Programming Tutorial

Java™ Homework Projects A NetBeans GUI Swing Programming Tutorial By Philip Conrod & Lou Tylee Kidware Software LLC PO Box 701 Maple Valley, WA 98038 http://www.computerscienceforkids.com http://www.kidwaresoftware.com Copyright © 2015 by Kidware Software LLC. All rights reserved Kidware Software LLC PO Box 701 Maple Valley, Washington 98038 1.425.413.1185 www.kidwaresoftware.com www.computerscienceforkids.com All Rights Reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Printed in the United States of America ISBN-13: 978-1-937161-63-7 (Printed) ISBN-13: 978-1-937161- 95-8 (Electronic) Previous edition published as “Programming Home Projects with Java – 7th Edition” Cover Design by Stephanie Conrod Copy Editor: Jessica Conrod Illustrations: Kevin Brockschmidt Compositor: Michael Rogers This copy of “Java Homework Projects” and the associated software is licensed to a single user. Copies of the course are not to be distributed or provided to any other user. Multiple copy licenses are available for educational institutions. Please contact Kidware Software for school site license information. This guide was developed for the course, “Java Homework Projects” produced by Kidware Software LLC, Maple Valley, Washington. It is not intended to be a complete reference to the Java language. Please consult the Oracle website for detailed reference information. This guide refers to several software and hardware products by their trade names. These references are for informational purposes only and all trademarks are the property of their respective companies and owners. Oracle and Java are registered trademarks of Oracle Corporation and/or its affiliates. JCreator is a trademark product of XINOX Software. Microsoft Word, Excel, and Windows are all trademark products of the Microsoft Corporation. All other trademarks are the property of their respective owners, and Kidware Software makes no claim of ownership by the mention of products that contain these marks. Kidware Software is not associated with any products or vendors mentioned in this book. Kidware Software cannot guarantee the accuracy of this information. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions. The information in this book is distributed on an "as is" basis, without and expresses, statutory, or implied warranties.Neither the author(s) nor Kidware Software LLC shall have any liability to any person or entity with respect to any loss nor damage caused or alleged to be caused directly or indirectly by the information contained in this book. About The Authors Philip Conrod has authored, co-authored and edited numerous computer programming books for kids, teens and adults. Philip holds a BS in Computer Information Systems and a Master's certificate in the Essentials of Business Development from Regis University. He also holds a Certificate in Programming for Business from WarrenTech. Philip has been programming computers since 1977. He has also held various Information Technology leadership roles in companies like Sundstrand Aerospace, Safeco Insurance Companies, FamilyLife, Kenworth Truck Company, PACCAR and Darigold Inc. In his spare time, Philip serves as the President & Publisher of Kidware Software, LLC. Philip and his lovely family live in Maple Valley, Washington. Lou Tylee holds BS and MS degrees in Mechanical Engineering and a PhD in Electrical Engineering. Lou has been programming computers since 1969 when he took his first Fortran course in college. He has written software to control suspensions for high speed ground vehicles, monitor nuclear power plants, lower noise levels in commercial jetliners, compute takeoff speeds for jetliners, locate and identify air and ground traffic and to let kids count bunnies, learn how to spell and do math problems. He has written several online texts teaching Visual Basic, Visual C# and Java to thousands of people. He taught a beginning Visual Basic course for over 15 years at a major university. Currently, Lou works as an engineer at a major Seattle aerospace firm. He is the proud father of five children and proud husband of his special wife. Lou and his family live in Seattle, Washington. Acknowledgements I want to thank my three wonderful daughters - Stephanie, Jessica and Chloe, who helped with various aspects of the book publishing process including software testing, book editing, creative design and many other more tedious tasks like finding errors and typos. I could not have accomplished this without all your hard work, love and support. I want to also thank my best friend Jesus, who has always been there by my side giving me wisdom and guidance. Without you, this book would have never been printed and published. I also want to thank my multi-talented co-author, Lou Tylee, for doing all the real hard work necessary to develop, test, debug, and keep current all the ‘beginner-friendly’ applications, games and base tutorial text found in this book. Lou has tirelessly poured his heart and soul into so many previous versions of this tutorial and there are so many beginners who have benefited from his work over the years. Lou is by far one of the best application developers and tutorial writers I have ever worked with. Thank you Lou for collaborating with me on this book project. Contents Course Description System Requirements Course Prerequisites Installing and Using the Downloadable Solution Files Using Java Homework Projects Forward by Alan Payne, A Computer Science Teacher 1. Introduction Preview Introducing Java Homework Projects Requirements for Java Homework Projects Testing the Installation Getting Help with a Java Program Structure of a Java Program Structure of a Java GUI Application Swing Controls Stopwatch - Creating a Java Project with NetBeans Stopwatch - Create a Frame Saving Java Projects with NetBeans NetBeans and Java Files Create the User Interface Stopwatch - Adding Controls Adding Event Methods Stopwatch - Writing Code Chapter Review 2. Dual-Mode Stopwatch Project Review and Preview Project Design Considerations Dual-Mode Stopwatch Project Preview Frame Design – GridBagLayout Manager Stopwatch Frame Design Code Design – Initial to Running State Code Design – Timer Object Code Design – Update Display Code Design – Running to Stopped State Code Design – Stopped State Dual-Mode Stopwatch Project Review Dual-Mode Stopwatch Project Enhancements Dual-Mode Stopwatch Project Java Code Listing 3. Consumer Loan Assistant Project Review and Preview Consumer Loan Assistant Project Preview Loan Assistant Frame Design Code Design – Switching Modes Frame Design – Focus Traversal Code Design – Computing Monthly Payment Code Design – Computing Number of Payments Code Design – Loan Analysis Code Design – New Loan Analysis Improving a Java Project Code Design – Zero Interest Code Design – Focus Transfer Code Design – Input Validation Confirm Dialog Code Design – User Messages Consumer Loan Assistant Project Review Consumer Loan Assistant Project Enhancements Consumer Loan Assistant Project Java Code Listing 4. Flash Card Math Quiz Project Review and Preview Flash Card Math Quiz Project Preview Flash Card Math Frame Design Code Design – Start Practice Code Design – Problem Generation Code Design – Obtaining Answer Code Design – Choosing Problem Type and Factor Code Design – Timing Options Code Design – Presenting Results Flash Card Math Quiz Project Review Flash Card Math Quiz Project Enhancements Flash Card Math Quiz Project Java Code Listing 5. Multiple Choice Exam Project Review and Preview Multiple Choice Exam Project Preview Multiple Choice Exam Frame Design Frame Design – Menu Options Frame Design – Initialization Code Design – Exam File Format Code Design – Generating Exam Files Code Design – Opening an Exam File Code Design – Reading an Exam File Code Design – Centering Comment Text Code Design – Error Trapping and Handling Frame Design – Selecting Options Code Design – Start Exam Code Design – Question Generation Code Design – Checking Multiple Choice Answers Code Design – Checking Type In Answers Code Design – Checking Spelling Code Design – Presenting Results Multiple Choice Exam Project Review Multiple Choice Exam Project Enhancements Multiple Choice Exam Project Java Code Listing 6. Blackjack Card Game Project Review and Preview Blackjack Card Game Project Preview Blackjack Frame Design Code Design – Card Definition Code Design – Card Shuffle Code Design – Start New Game Code Design – Start New Hand Code Design – End Hand

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.