Solved

javax.swing ...

Posted on 2004-08-30
10
225 Views
Last Modified: 2013-11-23
Hi experts,

   Here is the JFrame class from the Java tutorial
----------------------------------------------------
javax.swing

Class JFrame :
java.lang.Object
 ->  java.awt.Component
     -> java.awt.Container
         -> java.awt.Window
             -> java.awt.Frame
                 -> javax.swing.JFrame
------------------------------------------------------
   so .... what's the relationship between the packages : javax.swing and  java.awt ? or could anyone please explain the hiearchy to me ? Thanks very much !!!

meow.
0
Comment
Question by:meow00
10 Comments
 
LVL 18

Accepted Solution

by:
armoghan earned 100 total points
ID: 11938657
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11938661
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11938671
Summary:
Swing is base on AWT.
0
 
LVL 3

Assisted Solution

by:CI-Ia0s
CI-Ia0s earned 50 total points
ID: 11938705
Swing is the "new" AWT. Sun decided they wanted it to be more versatile, so they made a lot new components (practically all of them are new I think).
A JFrame is a Frame with more stuff. :D
A JPanel is a Panel with more stuff. :D

Also, they added the content pane to the JFrame. I believe you used to be able to add things directly... no more.
Also note that javax.swing has some new stuff, like JOptionPane. All in all, think of Swing as an update to awt.
0
 
LVL 6

Assisted Solution

by:expertmb
expertmb earned 50 total points
ID: 11938740
>>what's the relationship between the packages : javax.swing and  java.awt ?
those links give you diff b/w awt and swing.

swing is built on top or derived from awt.
awt is tied to native platform to get its rendering i.e., display look and feel, where as swing is not bound to any os to get its l&f.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 92

Assisted Solution

by:objects
objects earned 50 total points
ID: 11938757
0
 
LVL 15

Assisted Solution

by:Javatm
Javatm earned 50 total points
ID: 11938772
Class JFrame :
java.lang.Object
 ->  java.awt.Component
     -> java.awt.Container
         -> java.awt.Window
             -> java.awt.Frame
                 -> javax.swing.JFrame

AWT is the main GUI setup before and JFrame was made under swing on the top of awt components. In that sense swing
was composed and made on the top of AWT system.

Actually there is another component made by eclipse thats SWT.

Hope that helps . . .
Javatm
0
 
LVL 15

Expert Comment

by:Javatm
ID: 11938835
If your also interested in SWT :

SWT is the software component that delivers native widget functionality for the Eclipse platform in an operating system independent manner.  It is analogous to AWT/Swing in Java with a difference - SWT uses a rich set of native widgets.  Even in an ideal situation, industrial strength cross platform widget libraries are very difficult to write and maintain.  This is due to the inherent complexity of widget systems and the many subtle differences between platforms.  There are several basic approaches that have helped significantly to reduce the complexity of the problem and deliver high quality libraries.  This article discusses one of them, the low level implementation techniques used to implement SWT on different platforms.  Examples are drawn from the Windows® and Motif implementations.

http://www.eclipse.org/articles/Article-SWT-Design-1/SWT-Design-1.html

Hope that adds help . . .
Javatm

0
 
LVL 15

Expert Comment

by:Javatm
ID: 11938869
Let us know if you have any more questions !.
0
 
LVL 35

Expert Comment

by:girionis
ID: 11939293
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now