Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
by James Gosling
I hate to admit how long I've been using and building computer user interfaces. How many of you have ever taken apart and rebuilt an actual teletype? Or even remember when teletype had a capitol ‘T’ because it was the name of a corporation and it's product? Fortunately, those days are dust and I get to reuse all those old neurons. It's no longer the case that every CPU cycle gets dedicated to the task at hand, so that user interfaces had to be simple and the users had to be sophisticated. In many modern applications, the application's computational requirements are challenged or exceeded by the computational requirements of the user interface. This is only going to get more skewed as interfaces based on speech and artificial intelligence start to emerge.
In today's world, if you look at all the different programming interfaces that a developer needs to use, the facilities for interacting with us humans are easily the most important and most widely used. User interfaces are no longer something slapped onto the side of an application: they are now often the center from which the application grows. In this world we built Swing to be a full blown industrial strength system for constructing sophisticated user interfaces.
I had a hand in the early days of Swing. I had a lot of fun building pieces (most long gone!) and working with the team; and I've had a lot of fun since then as a user of Swing. I hope you have as much fun with it as I've had.
Don't be intimidated by the mass of this book. The Swing user interface toolkit is a very sophisticated one, with a large array of bells and whistles. This was a difficult trade-off in the design of Swing: on the one hand, there was a lot of demand for expansive industrial strength capabilities, while on the other hand, one of the most admired aspects of Java has been its ease of programming. A key to coping with this as a developer is understanding the distinctions between simple and easy: The Swing toolkit is not simple—the requirements list was too long for that to ever be possible. But it can be easy to use, since there are many shortcut methods (for example, take a look at the JOptionPane class), and since the vast majority of features can be ignored by the general developer.
Cruise over the treetops of this book. It has the breadth you need to understand all the components of Swing. Then dive in and let it lead you deeply into the places where you need all of the sophistication.
James Gosling
VP and Fellow,
Java Software, Sun Microsystems