![]() ![]() Since it no longer relied on the platform’s components, Swing could develop its own rich set of UI components without being handcuffed by the underlying platform’s components. This would allow it to overcome platform limitations. Instead of building abstractions over the platform’s native UI components, Swing would draw its own components using 2D drawing primitives. Swing was born out of the lessons learned from AWT of “what not to do”. This limitation led the engineers at Sun to imagine a new toolkit that they would build from the ground-up. ![]() ![]() What if a UI component isn’t available on a particular target platform, or it behaves in ways that aren’t compatible with the other platforms? You end up having to reduce the toolkit functionality to the lowest common denominator. This architecture sounds good on its surface, but imposes some serious limitations. To convert it into a cross-platform UI kit, they would later add bindings to the native UI toolkits of the other target platforms: Windows and Mac. It began as an abstraction over X11 components. Patrick’s description of how he created it gives you a window into the AWT architecture. This mini-toolkit would evolve into the Abstract Windowing Toolkit (aka AWT), which was bundled with Java 1.0. I then wrote a simple HTML parser and renderer which could display our group's home page. I ported a dynamic graph layout algorithm from C++ to my toolkit. I could then display little windowed applications written in Oak on a desktop computer. I wrote a mini-toolkit in Oak which had components and fonts and buttons and scrollbars etc. I revived a bunch of old Oak interfaces to X11 on my desktop. ![]() So, I set to work writing a simple abstraction for a window system. For the previous year, all we ever saw running in Oak was displayed on a television screen on the set top box simulator. I felt the need to get something working in Oak that was wicked cool on a desktop machine. In his first-hand account of the origins of Java, Patrick Naughton tells how he revived some old Oak 1 interfaces to X11 to make a mini-toolkit with components, and fonts, and buttons, and scrollbars, etc…. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |