• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

swings and operating System

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am beginner to swings. so i wanna now why is swing light weight is it because of native peer components. and well java is like platform independent so if the JVm makes native peer components and they depend on operating system then how can we say that it dont depend on operating system... isnt it? correct me if i am wrong..
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Harjinder,
Your logic is backwards. AWT is called heavyweight because it relies on the OS to draw and provide functionality to UI items. The OS stuff is considered heavy (think big).
Swing is called LightWeight because it handles all the drawing and functionality and doesn't need the OS for drawing or functionality. Therefore, we can have:
Motif look-and-feel on Windows or Mac, or
Windows look-and-feel on Unix or Mac, or
Mac look-and-feel on Unix and Windows.
Regards,
Manfred.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Harjinder
Be aware that not all of swing is lightweight, there are still some heavies in there, notably JFrame, JDialog, JWindow and I think JApplet.
reply
    Bookmark Topic Watch Topic
  • New Topic