wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Usage of awt components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Usage of awt components" Watch "Usage of awt components" New topic
Author

Usage of awt components

Stan Griffith
Greenhorn

Joined: Jun 04, 2005
Posts: 11
Hi Ranchers,

My assignement has the following statement.


The user interface for this assignment must satisfy the following criteria:

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


Does this mean that I can not use awt features like Font, Color? Infact all the layouts are from awt package.

Thanks

Stan
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Stan,

That instruction means that you cannot use any component from the AWT package for which there is a replacement in the Swing package. So you cannot use a Button since there is a JButton component.

Does this mean that I can not use awt features like Font, Color? Infact all the layouts are from awt package.
Yes, they are all from the java.awt package, but none of them are java.awt.Components.

Personally I suspect that the prohibition on using ant AWT Component was suggested at the time that the SCJP exam required candidates to know what was a java.awt.Component and what wasnt (boy, wasn't that fun :roll: ). Since candidates who passed SCJP 1.4 or SCJP 1.5 no longer need to know that class heirachy, the restriction on using ant AWT Component(s) only seems to confuse people. In fact, I am adding this to the FAQ now ...

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Stan Griffith
Greenhorn

Joined: Jun 04, 2005
Posts: 11
Thanks for the reply Andrew. I take it that it is ok to use classes like Font, Color and layouts like FlowLayout and BorderLayout.

regards

Stan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Usage of awt components
 
Similar Threads
Swing
Swing components
Using the GridBagLayout
a question about the restriction to the assignment
Swing Components