This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Exclusively Swing 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 "Exclusively Swing" Watch "Exclusively Swing" New topic
Author

Exclusively Swing

Serkan Yazici
Ranch Hand

Joined: Apr 24, 2004
Posts: 33
Hi All,

While going through a final checklist of must be's before submission,
I couldn't help but get stuck with the following requirement:

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


Now, I perfectly understand that we have to use JButtons, JFrames etc.
instead of Buttons and Frames. However, certain Swing features like event
handlers and most layouts are still part of AWT.

I've also found a previous discussion which pretty much concludes as I did:
We can use the required classes from AWT as long as they don't have a Swing
equivalent. But that exclusively phrase is worrying me a lot.

My question is Swing has some layouts such as BoxLayout, but I use
GridLayout and GridBagLayout which are defined in AWT quite a lot in my code. Should I stick to using Swing only layouts? (Man, I would be pissed
off if I have to

Just in case, here are my imports for the client GUI:


Does anyone see an inappropriate class that I shouldn't have used?

Thanks a lot.
Serkan


-- SCJP 1.4 (98%), SCJD (98%), SCWCD (96%), OCA Dev (97% avg.), SCBCD (97%), SCJP 1.5 BETA (90%)<br />-- OCP Dev (maybe), MCDBA (probably) SCEA (eventually)<br />-- Haven't tried Firefox yet? Free, open, secure, fast, tabified, and slick!<br />-- <a href="http://www.mozilla.org/products/firefox/" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/</a>
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Hi there.

I think the key words here are "Swing components". I.e. Visible stuff you see on screen.

IMO, using those awt features is perfectly fine and needed.
Some of my imports were as follows:

import java.awt.*;
import java.awt.event.*;

Hope that helps.

J


Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exclusively Swing
 
Similar Threads
Is it a Swing component?
Swing components
Use of AWT
Usage of awt components
a question about the restriction to the assignment