Solved

javax.swing ...

Posted on 2004-08-30
10
229 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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
 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
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…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

830 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