Solved

javax.swing ...

Posted on 2004-08-30
10
227 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

810 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