Swing
Re: swing or awt ?
Date: Sun, 4 May 2003 12:18:45 -0600Newsgroups: comp.lang.java.gui
Size: 1,667 bytes
Annetta wrote: > Can anybody tell me the difference or advantages of swing against awt? > Are there any problems known with browsers? Sure. Swing's advantages over the AWT include that it depends on fewer platform variables and is thus more likely to work acceptably on multiple platforms; that the model/component separation that's built in through the Swing API lets your adapt your GUI to the underlying logic, rather than having to worry about the GUI when you actually write the underlying logic; that there are a far richer set of standard APIs in Swing than in the AWT; that there are unified frameworks for such things as keyboard handling that are difficult in the base AWT event model; that if you want to customize your application look and feel, you can do so without worrying about what your changes will look like on different platforms; that Swing provides double-buffering in components by default; that Swing components automatically handle some nitpicky GUI stuff like borders on components and so on; and more. AWT's advantages are that it's native (which some people like for GUI consistency -- in fact, some people are rather fanatically attached to it); it's a lower-level toolkit and can sometimes be made a bit more efficient as a result; and that it's been around a little longer and is therefore more widely available. Swing in browsers, for all intents and purposes, requires the Java PlugIn. If you're writing applets, that could be an additional advantage of the AWT. -- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
