dcsimg
How portable is Swing vs AWT
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dan_cabrera
Posted On:   Wednesday, May 2, 2001 10:53 AM

Do I get the same degree of GUI portability with Swing than with AWT?.
How dependent is Swing on its ansestor
AWT?

Re: How portable is Swing vs AWT

Posted By:   Luigi_Viggiano  
Posted On:   Thursday, May 17, 2001 01:21 PM

Yes Swing is platform independent, and applications will render in the same way in different OS. Also your application can change "skin" to get nicer, also at runtime and will render in the same way in Linux, in Windows an so on...


Using AWT your application will mantain the same behaviour and the same "layout" but controls will render using the control set of host platform, then will be slightly different changing platform.

The reason why AWT is used, for example in applets, is that rendering and handling requires fewer downloaded classes because is managed by client/browser environment (the jar containing Swing extensions is a little big). AWT is supported by all the browsers Java enabled (java.awt is a core API).


Summarizing, and answering your 1st question, we can say that with Swing also appearance is portable.

About the 2nd question, Swing is dependent from AWT because there are some classes in Swing extending, wrapping, and using classes from AWT package, then there's a deep dependency between AWT and Swing.

Re: How portable is Swing vs AWT

Posted By:   Jason_Lilburn  
Posted On:   Saturday, May 12, 2001 09:44 AM

When looking at it from a broswer perspective. The average user at the current time would have trouble getting swing components to run.

Re: How portable is Swing vs AWT

Posted By:   Anonymous  
Posted On:   Sunday, May 6, 2001 03:31 PM

javax.swing.* it's part of the Java 2 distribution so every application that runs with the Java 2 Virtual Machine (1.2 and up) will be able to use swing.

Swing it is based on awt, so it depend heavily on it.
If you would like you can take a look at the javax.swing.* source files and you can verify this.

Regards.
About | Sitemap | Contact