Why swing when I have awt?

Discussion in 'Java' started by _.-=, Jul 30, 2003.

  1. _.-=

    _.-= Guest

    Hi!

    I was just wondering why anyone would bother with javax.swing when we have
    java.awt?

    Can anyone throw some light onto this topic?

    -NiCk
    _.-=, Jul 30, 2003
    #1
    1. Advertising

  2. "_.-=<[ { E v E r E a d y } ]>=-._" <> writes:

    > I was just wondering why anyone would bother with javax.swing when
    > we have java.awt?


    Because java.awt has less than 10% of the components Swing has, and
    Swing is easier to write complex applications in being MVC-driven.
    Tor Iver Wilhelmsen, Jul 30, 2003
    #2
    1. Advertising

  3. _.-=

    TDOR Guest

    > I was just wondering why anyone would bother with javax.swing when we have
    > java.awt?


    AWT: Some of its components are built on top of native
    widgets and are relatively fast and responsive. Many
    however are slow and buggy. AWT components generally
    don't pick up information on system font sizes etc.
    Lacks the more advanced components such as treeview and
    table.

    SWING: Has all the advanced components, but is slow and
    some would say ugly. You can try and change its appearance
    using skins although this aproach is not platform
    independant. Like AWT it dosen't pick up on users ui
    settings.

    SWT: Somewhat responsive on windows and does look like
    any other app on the system, but is difficult to deploy
    unless you use webstart.

    > Can anyone throw some light onto this topic?
    >
    > -NiCk
    TDOR, Jul 31, 2003
    #3
  4. _.-=

    Daniel Dyer Guest

    On 31 Jul 2003 03:43:10 -0700, TDOR <> wrote:

    > SWING: Has all the advanced components, but is slow and
    > some would say ugly. You can try and change its appearance
    > using skins although this aproach is not platform independant.


    Swing doesn't use skins as such, it has pluggable look and feels, which are
    a fair bit more complex than skins. They are generally platform
    independent (they are just Java classes after all) though some L&Fs may be
    tailored for specific platforms (such as Sun's XP look and feel).

    > Like AWT it dosen't pick up on users ui settings.


    That will depend on your look and feel. The latest Windows look and feel
    is quite good in this respect and will track the user's OS preferences. I
    believe the Mac OS X look and feel does something similar, though I have
    never used it.

    --
    Daniel Dyer
    Empathy Software (http://www.empathysoftware.com)


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
    Daniel Dyer, Jul 31, 2003
    #4
  5. _.-=

    Guest Guest

    "Daniel Dyer" <> skrev i melding
    news:eek:prs6aawuriihdmk@localhost...
    > On 31 Jul 2003 03:43:10 -0700, TDOR <> wrote:
    >
    > > SWING: Has all the advanced components, but is slow and
    > > some would say ugly. You can try and change its appearance
    > > using skins although this aproach is not platform independant.

    >
    > Swing doesn't use skins as such, it has pluggable look and feels, which

    are
    > a fair bit more complex than skins. They are generally platform
    > independent (they are just Java classes after all) though some L&Fs may be
    > tailored for specific platforms (such as Sun's XP look and feel).


    It WAS slow and ugly. I used to think so too. But try version 1.4.2
    (current version). It is a new experience!

    > > Like AWT it dosen't pick up on users ui settings.

    >
    > That will depend on your look and feel. The latest Windows look and feel
    > is quite good in this respect and will track the user's OS preferences. I
    > believe the Mac OS X look and feel does something similar, though I have
    > never used it.


    The Metal (cross-platform) and Motif Look&Feel (both avail. on all
    platforms)
    does not pick up user settings. I do not know exactly how the Windows pre-XP
    L&F behaves, but the new Windows XP L&F picks up bitmaps and settings from
    XP
    itself, so there is a good chance most user settings will carry over into
    Java
    programs. Same goes for the new GTK (Gnome) L&F.

    Head over to this site and try the new version, instead of spreading old
    and now incorrect information.
    http://www.java.com/en/index.jsp

    Roald
    Guest, Jul 31, 2003
    #5
  6. _.-=

    Daniel Dyer Guest

    On Thu, 31 Jul 2003 18:24:33 +0200, <> wrote:

    >
    > "Daniel Dyer" <> skrev i melding
    > news:eek:prs6aawuriihdmk@localhost...


    ....

    >> Swing doesn't use skins as such, it has pluggable look and feels, which

    > are
    >> a fair bit more complex than skins. They are generally platform
    >> independent (they are just Java classes after all) though some L&Fs may
    >> be
    >> tailored for specific platforms (such as Sun's XP look and feel).

    >
    > It WAS slow and ugly. I used to think so too. But try version 1.4.2
    > (current version). It is a new experience!


    Hang on, I never said it was slow and ugly, you need to be careful with
    your quoting, I believe you were responding to the point that I quoted, not
    the point I was making.

    >> > Like AWT it dosen't pick up on users ui settings.

    >>
    >> That will depend on your look and feel. The latest Windows look and
    >> feel
    >> is quite good in this respect and will track the user's OS preferences.
    >> I
    >> believe the Mac OS X look and feel does something similar, though I have
    >> never used it.

    >
    > The Metal (cross-platform) and Motif Look&Feel (both avail. on all
    > platforms)
    > does not pick up user settings. I do not know exactly how the Windows
    > pre-XP
    > L&F behaves, but the new Windows XP L&F picks up bitmaps and settings
    > from
    > XP
    > itself, so there is a good chance most user settings will carry over into
    > Java
    > programs. Same goes for the new GTK (Gnome) L&F.


    Yes, I was not disputing that, I was making pretty much the same point. As
    for the pre-XP look and feel, it does pick up some platform settings such
    as colours (and possibly fonts, though I'm not certain in that re).

    > Head over to this site and try the new version, instead of spreading old
    > and now incorrect information.


    I don't believe that I was, again it seems to have been a misunderstanding
    with the quoting.

    Dan.

    --
    Daniel Dyer
    Empathy Software (http://www.empathysoftware.com)


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
    Daniel Dyer, Jul 31, 2003
    #6
  7. Tor Iver Wilhelmsen, Jul 31, 2003
    #7
  8. _.-=

    TDOR Guest

    > > SWING: Has all the advanced components, but is slow and
    > > some would say ugly. You can try and change its appearance
    > > using skins although this aproach is not platform independant.

    >
    > Swing doesn't use skins as such, it has pluggable look and feels, which are
    > a fair bit more complex than skins. They are generally platform
    > independent (they are just Java classes after all) though some L&Fs may be
    > tailored for specific platforms (such as Sun's XP look and feel).


    I am not talking about code being platform independant - its the
    ui. I don't want to have to detect the platform myself (thats
    being plaform dependant!) to apply a skin the mimics the platform
    but does this inconsistantly and does not pick up the users settings.

    btw. skins are always complex unless you assume they do not scale,
    which I have only seen used for some multimedia apps, not desktop
    interfaces.
    TDOR, Aug 1, 2003
    #8
  9. _.-=

    Jon A. Cruz Guest

    Tor Iver Wilhelmsen wrote:
    > Daniel Dyer <> writes:
    >
    >
    >>Swing doesn't use skins as such, it has pluggable look and feels,
    >>which are a fair bit more complex than skins.

    >
    >
    > Some of those use skins.
    >
    > http://javootoo.l2fprod.com/plaf/skinlf/index.php
    >
    > http://sourceforge.net/projects/skinlf/


    Those aren't really "skins" as the general computing audience knows them.

    "Skins" generally reshape the applications entirely and at the least
    move controls all over the place.


    Some quick examples would be kjofol and gqmpeg

    http://www.team-mp3.com/mp3/mp3_kjofol_skins.htm

    http://gqmpeg.sourceforge.net/mpeg-skin1.html
    Jon A. Cruz, Aug 1, 2003
    #9
  10. _.-=

    TDOR Guest

    Daniel Dyer <> wrote in message news:<oprs72acjfiihdmk@localhost>...
    > On 1 Aug 2003 01:48:31 -0700, TDOR <> wrote:
    >
    > >> Swing doesn't use skins as such, it has pluggable look and feels, which
    > >> are a fair bit more complex than skins. They are generally platform
    > >> independent (they are just Java classes after all) though some L&Fs may
    > >> be tailored for specific platforms (such as Sun's XP look and feel).

    > >
    > > I am not talking about code being platform independant - its the ui. I
    > > don't want to have to detect the platform myself (thats being plaform
    > > dependant!) to apply a skin the mimics the platform
    > > but does this inconsistantly and does not pick up the users settings.

    >
    > OK, fair point, the definition of platform independence I was using was a
    > bit narrow, but if you want to pick up platform settings you really have to
    > do it in a platform-specific way. You can't pick-up someone's Windows
    > settings when running Gnome on Solaris for example, because there aren't
    > any Windows settings in that case.


    Exactly, thats the problem with the SWING way. I think sun left the AWT
    - build on top of native widgets - way, so they don't have to figure
    out what to do about the differences in the underlying widgets on
    different platforms. With SWING they don't have to worry about this
    because it draws the widgets itself. But then a new problem appear, that
    is, should the widgets pick up the users ui settings? If you wan't to
    do that consistantly, then you end up writing lots of platform specific
    code, and this might cancel out the time saved when porting widgets that
    draw themselves. And many ui settings won't even apply when you draw the
    widgets yourself. For that reason I predict that SWING will never be good
    at picking up on users ui settings, and if sun does make an effort of
    this then it will probably only be half measures and only on windows.
    TDOR, Aug 2, 2003
    #10
    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. EvErEady
    Replies:
    5
    Views:
    357
    Jos A. Horsmeier
    Aug 4, 2003
  2. Robert Mark Bram
    Replies:
    2
    Views:
    5,953
    Robert Mark Bram
    Dec 11, 2003
  3. mkrause
    Replies:
    0
    Views:
    669
    mkrause
    May 6, 2005
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,804
    Smokey Grindel
    Dec 2, 2006
  5. S.T
    Replies:
    2
    Views:
    576
Loading...

Share This Page