Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

NX: Use of awt components for user interface

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My instructions specify that the user interface:

must be composed exclusively with components from the Java Foundation Classes (Swing components)


Does this mean that AWT components should not be used?
I would like to use the Dimension and Toolkit classes to write code that centres a frame on the screen. Does anyone think this will result in a failure?
Thanks,
TH
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tatiana,

Originally posted by Tatiana Hyde:
Does this mean that AWT components should not be used?

No, it means that where there's a Swing component and AWT component use the Swing component. For example, use JFrame instead of Frame.

I would like to use the Dimension and Toolkit classes to write code that centres a frame on the screen. Does anyone think this will result in a failure?

No, you're OK, because there are no new Swing versions of these classes. I used both these classes and lost no points from the GUI score.

 
Tatiana Hyde
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks George!
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic