java swing 2nd edition 2005

908 693 0
java swing 2nd edition 2005

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Praise for the First Edition “What’s significant about this book is that the examples are nontrivial. It’s clear that much effort went into thinking out useful designs that both demonstrate the technolo- gies and leave the reader with a practical starting point for professional development … the book is full of pragmatic solutions … the very kind you need to address in produc- tion and can’t typically find answers for anywhere. I recommend this book to any serious Swing developer. If you’re a Swing beginner, you’ll get something out of this book, thanks to its frank, no-nonsense approach to teaching Swing development. What impressed me most was the focus on developing comprehensive examples… All in all, this is a real value for any Swing developer.” –Claude Duguay JavaZone “UI development is a very time consuming business. Even with such a powerful next gen- eration API at your fingertips it can be still overwhelming. Swing is a wonderful book that lightens the burden. It presents a complex subject in smaller manageable portions for the programmer who has learnt the basics and wants to go much further. This excellent book is impossible to take in at the first reading, because of the scope and breadth of its subject matter. I think you will find that it hits its target audience and goals repeatedly. A massive quality and quantity win for the publisher, Manning.” –Peter Pilgrim C Vu Journal “How many times have you opened a book in search of a solution and found not only an answer, but also an elegant enhancement to your application? How many times have you ignored an O’Reilly book on the same subject lying on your table? The answer is Manning’s new book Swing authored by Matthew Robinson and Pavel Vorobiev. And that is my final answer.” –Jayakrishnan Slashdot “An excellent resource for the developer of mid-level and advanced Swing applications. Many of the techniques I’ve had to investigate and develop over the last two years are described in this text. One of the few books to address the needs of serious Java 2 apps (e.g. printing, tables, trees, threads and Swing). Especially useful are the real-world NOTES and WARNINGs describing issues and anomalies.” –Christian Forster Amazon “This book covers everything there is to know about Swing. Here you will go deep into the internal workings of Swing to do some amazing things that frankly I, as a Windows programmer of five years, cannot do in Windows. The book has real good coverage of all the different classes in the Swing library, how they are used, and most importantly, how they are useful…” –Robert Hansen Amazon “…The book is considered a classic in Java Swing developers community and is highly recommended to anyone with some basic Swing understanding…” –Vadim Shun Amazon “I bought this book three weeks ago (right before our mission critical project). I was given just two weeks to finish the coding and unit testing. It was not a big project, yet, I thought I would like to use Swing for it and I came across your book… I spent four continuous days reading the book and in another four days I was done. You won’t believe the excite- ment I felt when I finished the project on time and the users were very astonished by the GUI. I would like to let you know that I am very grateful for this great book. It could not have been written in a more simple way than this.” –Unni Krishnan Amazon “One of the best books for understanding the Swing components. I have had problems with rendering in JList and JTree, and after reading this book, everything seems so simple. The material is very unique.” –Kirthi Venkatraman Amazon “I would recommend this book to anyone who wants to find out more about advanced Swing. It is packed full with good examples and explanations of those examples. The examples are very detailed and can be used as a starting point for your own projects.” –John Sullivan Amazon “…one of the best books available for learning the more advanced Swing features.” –Marty Hall Johns Hopkins University “I strongly recommend this book … especially for developers serious about getting into Java.” –Mark Newman GTE “I love the use of detailed examples … sets it apart from all the other books on Swing.” –Joel Goldberg FedEx “This is a must-have book for any kind of sophisticated UI development using Swing.” –Jaideep Baphna Dataware Technologies “The JTree text and detailed examples alone have already saved me many hours of work and have expedited my research code development.” –P. Pazandak, Ph.D. Object Services and Consulting “…will satisfy readers from beginner to advanced starts with easy-to-understand concepts and then drills down until it hits advanced intellectual pay dirt.” –Kirk Brown Sun Microsystems “Looking for a book on Swing with in-depth coverage of the how’s and why’s? Then Swing by Matthew Robinson and Pavel Vorobiev is it. Overall this is an excellent book, and I would recommend it for the intermediate to advanced Swing developer. –AnnMarie Ziegler JavaRanch.com Swing SECOND EDITION MATTHEW ROBINSON PAVEL VOROBIEV UI Guidelines by David Anderson Code Notes by David Karr MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, visit http://www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: orders@manning.com ©2003 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Elizabeth Martin 209 Bruce Park Avenue Typesetter: Aleksandra Sikora Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1930110-88-X Printed in the United States of America 12345678910–VHG–0706050403 To Deirdre— Matt To my wife, Maria— Pavel ix brief contents Part I Foundation 1 1 Swing overview 3 2Swing mechanics15 Part II The basics 71 3Frames, panels, and borders73 4Layout managers89 5 Labels and buttons 155 6 Tabbed panes 187 7 Scrolling panes 202 8 Split panes 220 9 Combo boxes 227 10 List boxes and Spinners 256 11 Text components and undo 292 12 Menus, toolbars, and actions 332 13 Progress bars, sliders, and scroll bars 373 14 Dialogs 418 x BRIEF CONTENTS Part III Advanced topics 469 15 Layered panes 471 16 Desktops & internal frames 476 17 Trees 498 18 Tables 536 19 Inside text components 605 20 Constructing an HTML Editor Application 634 21 Pluggable look and feel 723 Part IV Special topics 755 22 Printing 757 23 Constructing XML.editor 789 24 Drag & Drop 826 [...]... examples presented in Swing Second Edition is available from www.manning.com/sbe PRE F AC E xxvii acknowledgments First we’d like to thank James Gosling for writing the foreword to this edition Java has changed our careers in many ways and it is an honor to have its creator introduce our book Thanks to the readers of the first edition, especially those who bought the book Without you this edition would not... components are derived from the java. awt.Component class, as figure 1.1 illustrates (Note that AWT menu bars and menu bar items do not fit within the Component hierarchy.) Figure 1.1 Partial component hierarchy The Java Foundation Classes (JFC) consist of five major parts: AWT, Swing, Accessibility, Java 2D, and Drag and Drop Java 2D has become an integral part of AWT, Swing is built on top of AWT, and... AWT, Swing is built on top of AWT, and Accessibility support is built into Swing The five parts of JFC are certainly 3 not mutually exclusive, and Swing is expected to merge more deeply with AWT in future versions of Java Thus, AWT is at the core of JFC, which in turn makes it one of the most important libraries in Java 2 1.2 SWING Swing is a large set of components ranging from the very simple, such as... reference or suggested background knowledge for the material being discussed NOTE JAVA 1.3 We use this mark wherever a new feature or update is introduced from Java 1.3 JAVA 1.4 We use this mark wherever a new feature or update is introduced from Java 1.4 Occasionally, incorrect or unexpected behavior is caused by known Swing bugs We do not attempt to hide or gloss over these; rather, we explicitly discuss... intermediate understanding of Swing For this reason we do not recommend this book to Swing beginners For beginners we suggest Manning’s own Up to Speed with Swing by Steven Gutz Our goal was to produce a book that contains enough explanation and examples to satisfy the most demanding Swing developer We feel we have accomplished this goal again with the updates in this edition, but please judge for... feedback Unlike the first edition, however, this version is not freely available on the publisher’s web site The first edition will remain available online at www.manning.com/sbe, but we hope that we have developed enough of a following to generate more sales with the second edition without giving it away for free Let’s hope this is true! What’s changed since the first edition? Java 1.4 (aka Merlin) is... still done by Sun engineers, this process allowed Java 1.4 to evolve for the first time in a democratic fashion The result is a platform containing improvements that the Java community as a whole voted for, not just Sun This updated edition of Swing contains many new examples, revised text, and additional material to bring the book up to date with Java 1.4 This includes complete coverage of the new... is placed on using Swing to solve a broad selection of realistic and creative problems We assume an intermediate knowledge of Java, including the basics of putting together an AWTbased GUI, how the event model works, and familiarity with anonymous and explicit inner classes Those who do not have this background can pick it up in any beginner book on AWT or Swing However, the first edition of this book... cover illustration xxxi Part I Foundations 1 1 Swing overview 3 1.1 AWT 3 1.2 Swing 4 Z-order 5, Platform independence 5, Swing package overview 5 1.3 MVC architecture 7 Model 7, View 8, Controller 8, Custom view and controller 8, Custom models 9 1.4 UI delegates and PLAF 11 The ComponentUI class 11, Pluggable look and feel 12, Where are the UI delegates? 13 2 Swing mechanics 15 2.1 JComponent properties,... JFC Swing class library The first chapter begins with a brief overview of what Swing is and an introduction to its architecture The second chapter contains a detailed discussion of the key mechanisms underlying Swing, and it shows you how to interact with them There are several sections on topics that are fairly advanced, such as multithreading and painting This material is central to many areas of Swing . book, and I would recommend it for the intermediate to advanced Swing developer. –AnnMarie Ziegler JavaRanch.com Swing SECOND EDITION MATTHEW ROBINSON PAVEL VOROBIEV UI Guidelines by David Anderson Code. TimerQueue 30 2.7 JavaBeans architecture 31 The JavaBeans component model 31, Introspection 31, Properties 32, Customization 32, Communication 32, Persistency 32, A simple Swing- based JavaBean 33 2.8. recommend this book to any serious Swing developer. If you’re a Swing beginner, you’ll get something out of this book, thanks to its frank, no-nonsense approach to teaching Swing development. What impressed

Ngày đăng: 19/04/2014, 20:05

Từ khóa liên quan

Mục lục

  • brief contents

  • contents

  • foreword

  • preface

  • acknowledgments

  • about the cover illustration

  • PART

  • Foundations

  • chapter1

  • Swing overview

    • 1.1 AWT

    • 1.2 Swing

      • 1.2.1 Z-order

      • 1.2.2 Platform independence

      • 1.2.3 Swing package overview

      • 1.3 MVC architecture

        • 1.3.1 Model

        • 1.3.2 View

        • 1.3.3 Controller

        • 1.3.4 Custom view and controller

        • 1.3.5 Custom models

        • 1.4 UI delegates and PLAF

          • 1.4.1 The ComponentUI class

          • 1.4.2 Pluggable look and feel

Tài liệu cùng người dùng

Tài liệu liên quan