?
Solved

javax.swing ...

Posted on 2004-08-30
10
Medium Priority
?
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 18

Accepted Solution

by:
armoghan earned 400 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 3

Assisted Solution

by:CI-Ia0s
CI-Ia0s earned 200 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 200 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
 
LVL 92

Assisted Solution

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

Assisted Solution

by:Javatm
Javatm earned 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video teaches viewers about errors in exception handling.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

719 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