Solved

javax.swing ...

Posted on 2004-08-30
10
232 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 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jsp login check 12 67
How does initial implicit objects  are set up in JSP? 7 41
Java ArrayList and if statement 2 55
Firefox and firebub 5 29
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

751 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