Results 1 to 2 of 2
Thread: differences: AWT and Swing
- 08-06-2007, 04:17 AM #1Member
- Join Date
- Jul 2007
- Rep Power
- 08-06-2007, 09:01 AM #2
Native widgets are called peers. A java AWT component needs a peer to be shown on the screen. Lightweight, Swing (J prefix) components do not. However they must be shown in a top–level container (JApplet, JFrame, JWindow, etc) which does need a peer or native widget.
The AWT is the original abstract windowing tookit. The Swing set came out in j2se 1.2
You can find a lot of AWT code on the web, old applets and the like. Also, I think the mobile phone people use AWT. Swing is easier to use, has more options and is most common in use by developers. It is best not to mix the two. You can but there are some gotchas to be aware of.
- By valery in forum New To JavaReplies: 2Last Post: 04-16-2009, 08:13 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 12-19-2007, 09:53 AM
- By bugger in forum AWT / SwingReplies: 4Last Post: 11-22-2007, 10:44 AM
- By cecily in forum New To JavaReplies: 1Last Post: 08-02-2007, 05:37 PM
- By elizabeth in forum New To JavaReplies: 1Last Post: 07-30-2007, 07:02 PM