Programming with Visualage for Java Version 2

Programming with Visualage for Java Version 2

Programming with VisualAge for Java Version 2 John Akerley, Nina Li, Antonello Parlavecchia International Technical Support Organization http://www.redbooks.ibm.com SG24-5264-00 SG24-5264-00 International Technical Support Organization Programming with VisualAge for Java Version 2 November 1998 Take Note! Before using this information and the product it supports, be sure to read the general information in “Special Notices” on page 383. First Edition (November 1998) This edition applies to Version 2 of VisualAge for Java, Professional Edition, for use with the OS/2, Windows 95, or Windows NT operating systems. Sample Code on the Internet The sample code for this redbook is available as sg245264.zip on: ftp://www.redbooks.ibm.com/redbooks/SG245264 Download sg245264.zip and read the README.TXT file included in the file. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 1998. All rights reserved Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Figures. .ix Tables. xv Tips . xvii Preface. .xix How to Use This Book . xix Conventions Used in This Book . xx Examples in This Book . xx World Wide Web Addresses in This Book . xx ITSO on the Internet. xxi VisualAge for Java Service and Support . xxi About the Authors. xxii Acknowledgments . xxii Comments Welcome . xxiii Chapter 1. Introduction to the Environment . 1 VisualAge for Java Product Family . 1 VisualAge for Java Professional . 2 VisualAge for Java Entry. 4 VisualAge for Java Enterprise. 4 Updates to VisualAge for Java . 5 Building Your First Applet. 5 Let’s Get Started! . 6 Creating an Animated Applet . 12 Changing the Properties of the Applet . 13 Building Your First Application . 14 The VisualAge for Java Scrapbook . 18 Using the Scrapbook. 19 Correcting Errors in the Scrapbook. 23 Customizing VisualAge for Java. 25 Workbench Options. 25 Chapter 2. Organizing Your Code . 29 Projects in VisualAge for Java . 29 The Workbench . 30 The Workbench Projects Page . 32 The Workbench Packages View . 34 Using Types from Other Packages . 36 © Copyright IBM Corp. 1998 iii The Workbench Classes Page . 38 The Workbench Interfaces Page. 39 The Workbench All Problems Page . 40 Importing and Exporting Java Code with VisualAge for Java. 42 Importing into VisualAge for Java . 43 Exporting from VisualAge for Java . 45 Chapter 3. Beginning the ATM Project . 49 ATM Application . 49 ATM Object Model . 52 JavaBeans . 53 Event Features . 54 Property Features . 55 Method Features . 56 Introspection and the BeanInfo Class . 57 Using VisualAge for Java to Create JavaBeans. 58 The Class Browser . 58 Using the BeanInfo Page . 63 What about the BeanInfo Class? . 66 Building the ATM Model . 68 Building the Transaction Class . 69 Building the BankAccount Bean . 71 Building the CheckingAccount Bean . 81 Building the SavingsAccount Bean . 86 Building the Card Bean . 87 Building the Customer Bean . 91 Building the Bank Bean. 94 Chapter 4. Building User Interfaces . 99 An Abstract Windowing Toolkit Refresher . 100 What Is the JFC? . 100 The JFC and the AWT . 101 JFC Components . 102 The JFC and the MVC Architecture . 104 Look and Feel. 105 Layout Managers . 106 FlowLayout . 107 BorderLayout. 107 BoxLayout . 108 CardLayout . 109 GridLayout. 110 GridBagLayout . 111 OverlayLayout . 111 iv Programming with VisualAge for Java Version 2 Using Layout Managers in VisualAge for Java . 112 Visual Composition Editor . 112 The Beans Palette. 114 Free-Form Surface . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    448 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us