• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Use of awt components for user interface

 
Tatiana Hyde
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks George!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic