what can't you do in swing but in awt?

Discussion in 'Java' started by glin@tollnz.co.nz, Mar 7, 2005.

  1. Guest

    what can't you do in swing but in awt? thank you.
     
    , Mar 7, 2005
    #1
    1. Advertising

  2. Swing is a superset of AWT. So, by definition, anything that you can do in
    AWT, you can do in Swing.

    <> wrote in message
    news:...
    > what can't you do in swing but in awt? thank you.
    >
     
    Alex Molochnikov, Mar 7, 2005
    #2
    1. Advertising

  3. First:

    Some operations might be simpler in AWT!

    Second:

    For a resource light device (PDA, cell) you might need to use AWT
    which is much lighter than Swing!

    AWT - Awkward Windows Toolkit

    --
    Regards,
    Casey
     
    Casey Hawthorne, Mar 7, 2005
    #3
  4. The question was stated in the unqualified form: what can you do in AWT that
    cannot be done in Swing. And the answer to THAT question remains: nothing.
    Whether the operations might be simpler is of no consequence here, since AWT
    has reduced functionality in comparison with Swing, and for this reason
    alone is simpler in all respects. And AWT is, of course, lighter than
    Swing - which again has nothing to do with the OP question.

    "Casey Hawthorne" <> wrote in message
    news:...
    > First:
    >
    > Some operations might be simpler in AWT!
    >
    > Second:
    >
    > For a resource light device (PDA, cell) you might need to use AWT
    > which is much lighter than Swing!
    >
    > AWT - Awkward Windows Toolkit
    >
    > --
    > Regards,
    > Casey
     
    Alex Molochnikov, Mar 7, 2005
    #4
  5. Hal Rosser Guest

    You can operate in a java 1.1 environment with awt - but not with swing

    "Alex Molochnikov" <> wrote in message
    news:VY4Xd.599318$6l.200383@pd7tw2no...
    > The question was stated in the unqualified form: what can you do in AWT

    that
    > cannot be done in Swing. And the answer to THAT question remains: nothing.
    > Whether the operations might be simpler is of no consequence here, since

    AWT
    > has reduced functionality in comparison with Swing, and for this reason
    > alone is simpler in all respects. And AWT is, of course, lighter than
    > Swing - which again has nothing to do with the OP question.
    >
    > "Casey Hawthorne" <> wrote in message
    > news:...
    > > First:
    > >
    > > Some operations might be simpler in AWT!
    > >
    > > Second:
    > >
    > > For a resource light device (PDA, cell) you might need to use AWT
    > > which is much lighter than Swing!
    > >
    > > AWT - Awkward Windows Toolkit
    > >
    > > --
    > > Regards,
    > > Casey

    >
    >
     
    Hal Rosser, Mar 8, 2005
    #5
  6. "Hal Rosser" <> wrote in message
    news:kF7Xd.5183$...
    > You can operate in a java 1.1 environment with awt - but not with swing


    Perhaps you forgot to put a smiley at the end of your statement. Otherwise
    it is hard to take seriously claims of Swing deficiency in the timeframe
    before Swing came into existence.
     
    Alex Molochnikov, Mar 8, 2005
    #6
  7. Wiseguy Guest

    "Alex Molochnikov" <> scribbled on the stall wall:
    > The question was stated in the unqualified form: what can you do in AWT that
    > cannot be done in Swing. And the answer to THAT question remains: nothing.
    > Whether the operations might be simpler is of no consequence here, since AWT
    > has reduced functionality in comparison with Swing, and for this reason
    > alone is simpler in all respects. And AWT is, of course, lighter than
    > Swing - which again has nothing to do with the OP question.


    Is AWT really (lighter) than Swing? I guess it depends on your definition
    of lighter.

    From page 3 of Sun's Mastering the JFC:

    Swing is a set of mostly lightweight components built on top the AWT.
    Swing provides lightweight replacements for the AWT's heavyweight components,


    The introduction chapter gives a lengthy description of the history of
    Swing and how it is suppose to overcome the (serious flaws) in the AWT
    peer-to-peer architecture.



    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Wiseguy, Mar 8, 2005
    #7
  8. "Wiseguy" <> wrote in message
    news:422d4519$1_1@127.0.0.1...
    > Is AWT really (lighter) than Swing? I guess it depends on your definition
    > of lighter.
    >
    > From page 3 of Sun's Mastering the JFC:
    >
    > Swing is a set of mostly lightweight components built on top the AWT.
    > Swing provides lightweight replacements for the AWT's heavyweight

    components,

    It is. Don't be misled by the word "lightweight" in the Sun's description of
    Swing. In Sun's terminology, "lightweight" means not dependent on the native
    GUI components of the underlying platform, the native components being
    considered "heavy". Performance and memory-wise, Swing is much heavier than
    AWT.
     
    Alex Molochnikov, Mar 8, 2005
    #8
  9. Rogan Dawes Guest

    Alex Molochnikov wrote:
    > "Hal Rosser" <> wrote in message
    > news:kF7Xd.5183$...
    >
    >>You can operate in a java 1.1 environment with awt - but not with swing

    >
    >
    > Perhaps you forgot to put a smiley at the end of your statement. Otherwise
    > it is hard to take seriously claims of Swing deficiency in the timeframe
    > before Swing came into existence.
    >


    I think it was actually a fair comment, and did not require smiley's.

    The reality is that there are still Java 1.1 environments around
    (Windows 95, Win98?), and if you are writing an applet, you need to
    consider this.

    Rogan
    --
    Rogan Dawes

    *ALL* messages to will be dropped, and added
    to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"
     
    Rogan Dawes, Mar 8, 2005
    #9
  10. "Rogan Dawes" <> wrote in message
    news:d0jm5c$qfp$...
    > I think it was actually a fair comment, and did not require smiley's.
    >
    > The reality is that there are still Java 1.1 environments around
    > (Windows 95, Win98?), and if you are writing an applet, you need to
    > consider this.


    I cannot imagine anyone writing for Java 1.1 env. these days - where would
    one even get it from? Applets are all but extinct now, and the few that
    still survive make use of Java plugin available from Sun - and it ain't 1.1.

    Again, the original question was - what can be done in AWT that cannot be
    done in Swing? And my answer still is: nothing.

    The lifespan of this thread has already far exceeded its importance, and the
    OP does not seem to care of the result of this debate either way, so I will
    let you have the final word in it.
     
    Alex Molochnikov, Mar 8, 2005
    #10
  11. Alex Molochnikov wrote:
    > The lifespan of this thread has already far exceeded its importance, and the
    > OP does not seem to care of the result of this debate either way,


    I would guess the OP got his homework question solved and will not show
    up until his next home work is due.

    /Thomas


    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
     
    Thomas Weidenfeller, Mar 8, 2005
    #11
  12. Tony Morris Guest

    "Alex Molochnikov" <> wrote in message
    news:6kdXd.603017$Xk.569092@pd7tw3no...
    > "Rogan Dawes" <> wrote in message
    > news:d0jm5c$qfp$...
    > > I think it was actually a fair comment, and did not require smiley's.
    > >
    > > The reality is that there are still Java 1.1 environments around
    > > (Windows 95, Win98?), and if you are writing an applet, you need to
    > > consider this.

    >
    > I cannot imagine anyone writing for Java 1.1 env. these days - where would
    > one even get it from? Applets are all but extinct now, and the few that
    > still survive make use of Java plugin available from Sun - and it ain't

    1.1.
    >
    > Again, the original question was - what can be done in AWT that cannot be
    > done in Swing? And my answer still is: nothing.
    >
    > The lifespan of this thread has already far exceeded its importance, and

    the
    > OP does not seem to care of the result of this debate either way, so I

    will
    > let you have the final word in it.
    >
    >


    Applets extinct?
    What poor misinformed soul told you that?
    The <applet> HTML tag is deprecated - a misinterpretation perhaps?

    --
    Tony Morris
    http://xdweb.net/~dibblego/
     
    Tony Morris, Mar 8, 2005
    #12
  13. Bill Tschumy Guest

    On Mon, 7 Mar 2005 15:25:32 -0600, Alex Molochnikov wrote
    (in article <gF3Xd.596532$Xk.557830@pd7tw3no>):

    > Swing is a superset of AWT. So, by definition, anything that you can do in
    > AWT, you can do in Swing.
    >
    > <> wrote in message
    > news:...
    >> what can't you do in swing but in awt? thank you.
    >>

    >
    >


    You can display native file dialogs in AWT that in many cases perform much
    better that their Swing counterparts. This is particularly true on Mac OS X.

    --
    Bill Tschumy
    Otherwise -- Austin, TX
    http://www.otherwise.com
     
    Bill Tschumy, Mar 8, 2005
    #13
  14. Guest

    a dumb question, can you make swing objects and awt objects work
    together?
    like jpanel to containt awt buttons etc..
     
    , Mar 9, 2005
    #14
  15. You can, but using Swing and AWT components within the _same_ JFrame is
    discouraged. See
    http://java.sun.com/products/jfc/tsc/articles/mixing/index.html. In
    particular, putting Buttons into JPanel is asking for trouble (see the given
    link).

    <> wrote in message
    news:...
    > a dumb question, can you make swing objects and awt objects work
    > together?
    > like jpanel to containt awt buttons etc..
    >
     
    Alex Molochnikov, Mar 9, 2005
    #15
  16. Gerry Guest

    On a related note, is there any plans to extend the abilities of AWT?
    Or is Swing supposed to be the way to go?

    I would prefer to use native interface elements rather than using
    something that might resemble a native control.


    This is especially noticable on a Mac where the menu bar is not at the
    top of the window. It's at the top of the screen.

    I haven't been keeping up on the progress of Java.
    Why is Swing preferred over an updated AWT?

    --
    http://www.mts.net/~gbeggs1/
     
    Gerry, Mar 9, 2005
    #16
  17. Gerry wrote:

    > On a related note, is there any plans to extend the abilities of AWT?
    > Or is Swing supposed to be the way to go?
    >
    > I would prefer to use native interface elements rather than using
    > something that might resemble a native control.


    Did you tried SWT?
    http://www.eclipse.org/swt/

    --
    Regards,
    Olek
     
    Aleksander =?iso-8859-2?Q?Str=B1czek?=, Mar 10, 2005
    #17
  18. "Gerry" <> wrote in message
    news:1gt61wp.1rciq9n1cvg0zqN%...
    > On a related note, is there any plans to extend the abilities of AWT?
    > Or is Swing supposed to be the way to go?
    >
    > I would prefer to use native interface elements rather than using
    > something that might resemble a native control.
    >
    >
    > This is especially noticable on a Mac where the menu bar is not at the
    > top of the window. It's at the top of the screen.


    System.setProperty("com.apple.macos.useScreenMenuBar", "true");
    or on Java 1.4 or higher
    System.setProperty("apple.laf.useScreenMenuBar", "true");
    will enable that for Swing with Mac L&F.
     
    Larry Barowski, Mar 10, 2005
    #18
  19. Gerry Guest

    Larry Barowski <MElarrybar-AT-eng_DOT_auburnANOTHERDOTeduEND> wrote:

    > > On a related note, is there any plans to extend the abilities of AWT?
    > > Or is Swing supposed to be the way to go?
    > >
    > > I would prefer to use native interface elements rather than using
    > > something that might resemble a native control.
    > >
    > >
    > > This is especially noticable on a Mac where the menu bar is not at the
    > > top of the window. It's at the top of the screen.

    >
    > System.setProperty("com.apple.macos.useScreenMenuBar", "true");
    > or on Java 1.4 or higher
    > System.setProperty("apple.laf.useScreenMenuBar", "true");
    > will enable that for Swing with Mac L&F.


    Okay... But why not use native interface elements rather than the way
    Swing is implemented where everything is a 'skin'?

    I like the idea another poster mentioned for SWT which uses native
    interface elements if the platform supports it. If it doesn't then one
    will be 'emulated' on that platform.

    But SWT isn't built into Java.

    --
    http://www.mts.net/~gbeggs1/
     
    Gerry, Mar 10, 2005
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ramon F Herrera

    Porting from Swing to AWT?

    Ramon F Herrera, Jun 30, 2003, in forum: Java
    Replies:
    3
    Views:
    830
    Gerbrand van Dieijen
    Jul 3, 2003
  2. _.-=
    Replies:
    9
    Views:
    480
  3. Robert Mark Bram
    Replies:
    2
    Views:
    5,967
    Robert Mark Bram
    Dec 11, 2003
  4. Don Sykes
    Replies:
    3
    Views:
    679
    Christophe Vanfleteren
    Feb 25, 2004
  5. mkrause
    Replies:
    0
    Views:
    674
    mkrause
    May 6, 2005
Loading...

Share This Page