wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes A newbie to MVC Architecture,components in JFC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "A newbie to MVC Architecture,components in JFC" Watch "A newbie to MVC Architecture,components in JFC" New topic
Author

A newbie to MVC Architecture,components in JFC

mara thamizhan
Ranch Hand

Joined: Jul 05, 2006
Posts: 74
Hi all,

I read that swing components are lightweight components as compared to heavyweight components of AWT.

What are components in AWT & SWING ? Is it refers to the java classes?

What is a lightweight component & a heavy weight component!

What is the difference b/w them?

What things can we do in Swing which we cannot do Using Swing Components?

can i Know abt MVC Architecture( which is used consistently througthout the Swing component set)?

Also is it true that AWT components are platform dependent whereas Swing Components are platform independent!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38087
    
  22
I can answer a few of your questions; I shall leave people with more time to answer about MVC. I would have thought most of your answers will be in a standard Java book . . .

The Swing classes are newer than the awt (=Abstract Windowing Toolkit) classes; awt classes mostly live in the java.awt package and Swing in the javax.swing package. A few awt classes (eg BorderLayout, Color) are used unchanged by Swing. If there is a Swing class with similar functionality to an awt class, they have the same name with the Swing class having a J prefix. So you can look for Button or JButton. I think Swing was introduced in J1.2, am not certain.

What they mean by "heavyweight" (ie most awt classes) is that they "borrow" the operating system's display mechanisms, so a Frame on Windows looks like any other Windows Frame, but the same program on a Mac will look just like any Mac window, etc.
Swing classes use their own look-and-feel (most people leave the default, which is called "Metal", unchanged), so they are supposed to look the same on any OS; not using the OS mechanics is called "lightweight."

And that's all you're getting from me CR
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: A newbie to MVC Architecture,components in JFC
 
Similar Threads
About Jpanel paintcomponent
JMenu items creating problems
Menu problem
swing
some java interview Questions