Thursday, July 4, 2019

Java Swing, (2nd Edition), Free PDF

File Size: 8.00 Mb

When Java was first released, its user interface facilities were a significant weakness. The Abstract Window Toolkit (AWT) was part of the JDK from the beginning, but it really wasn't sufficient to support a complex user interface. It supported everything you could do in an HTML form and provided free-standing frames, menus, and a few other objects, but you'd be hard-pressed to implement an application as complex as Quicken or Lotus Notes. AWT also had its share of portability problems; it relied heavily on the runtime platform's native user interface components, and it wasn't always possible to hide differences in the way these components behaved.

JDK 1.1 fixed a number of problems—most notably, it introduced a new event model that was much more efficient and easier to use—but it didn't make any major additions to the basic components. We got a ScrollPane and a PopupMenu, but that was about it. Furthermore, AWT still relied on the native components and therefore continued to have portability problems.

In April 1997, Sun's Java group (then called JavaSoft) announced the Java Foundation Classes, or JFC, which supersedes (and includes) AWT. A major part of the JFC was a set of much more complete, flexible, and portable user interface components called "Swing." (The JFC also includes a comprehensive facility for 2D graphics, printing, and Drag and Drop.) With Swing, you can design interfaces with tree components, tables, tabbed dialogs, tooltips, and a growing set of other features that computer users are accustomed to.

In addition to the new components, Swing made three major improvements to the AWT. First, Swing doesn't rely on the runtime platform's native components. It's written entirely in Java and creates its own components. This approach solved most of the portability problems since components don't inherit weird behaviors from the runtime environment or do they work against its grain. Second, because Swing is in complete control of the components, it's in control of the way components look on the screen and gives you more control over how your applications look. You can choose between several pre-built "look-and-feels" (L&Fs), or you can create your own if you want your software to show your personal style (more appropriate for games than for daily productivity software, of course). This feature is called "Pluggable Look-and-Feel," or PLAF. Third, Swing makes a very clear distinction between the data a component displays (the "model") and the actual display (the "view"). While the fine points of this distinction are appreciated mostly by computer scientists, it has important implications for all developers. This separation means that components are extremely flexible. It's easy to adapt components to display new kinds of data that their original design didn't anticipate or to change the way a component looks without getting tangled up in assumptions about the data it represents.

What This Book Covers
What's New in This Edition?
On the Web Site
How to Contact Us
Chapter 1. Introducing Swing
Chapter 2. Jump-Starting a Swing Application
Chapter 3. Swing Component Basics
Chapter 4. Labels and Icons
Chapter 5. Buttons
Chapter 6. Bounded-Range Components
Chapter 7. Lists, Combo Boxes, and Spinners
Chapter 8. Swing Containers
Chapter 9. Internal Frames
Chapter 10. Swing Dialogs
Chapter 11. Specialty Panes and Layout Managers
Chapter 12. Chooser Dialogs
Chapter 13. Borders
Chapter 14. Menus and Toolbars
Chapter 15. Tables
Chapter 16. Advanced Table Examples
Chapter 17. Trees
Chapter 18. Undo
Chapter 19. Text 101
Chapter 20. Formatted Text Fields
Chapter 21. Carets, Highlighters, and Keymaps
Chapter 22. Styled Text Panes
Chapter 23. Editor Panes and Editor Kits
Chapter 24. Drag and Drop
Chapter 25. Programming with Accessibility
Chapter 26. Look and Feel
Chapter 27. Swing Utilities
Chapter 28. Swing Under the Hood
Appendix A. Look-and-Feel Resources
Appendix B. Component Actions

Author Details
"Brian Cole"

"Robert Eckstein"

"James Elliott"

"Marc Loy"

"David Wood"

Download Drive-1

You May Also Like These E-Books:-

No comments:

Post a Comment