It must be composed exclusively with components from the Java Foundation Classes (Swing components). But for future reference to others there are the new layoutStyle
which are part of the JFC. We are allowed to JComponents?
SCJP 6.0, SCJD (400/400), SCBCD for JEE 5, SCWCD 1.4 I do videos for development at
http://www.youtube.com/user/thejartender?feature=mhee
I am probably the only developer ever to have had an orange sized brain tumor in my brain while learning development!!
Alex Belisle Turcot
Ranch Hand
Joined: Apr 26, 2005
Posts: 516
posted
0
Yucca Nel wrote:Heres what I am told to do.
It must be composed exclusively with components from the Java Foundation Classes (Swing components). But for future reference to others there are the new layoutStyle
which are part of the JFC. We are allowed to JComponents?
You're still allowed to use classes which have no equivalent under swing... For example, ActionListener is under java.awt.event... There are no equivalent with swing package and thus you are allowed to use it.
What would be wrong is to use something like Button under awt while JButton is available. Pretty much all GUI "visual component" (button, dropdown, menu...) must be SWING.. on the other hand, Event objects are in awt.
Regards,
Alex
Alex Belisle Turcot
Ranch Hand
Joined: Apr 26, 2005
Posts: 516
posted
0
Yucca Nel wrote:But for future reference to others there are the new layoutStyle
which are part of the JFC. We are allowed to JComponents?
Hi,
What's wrong with JComponent ? It is a swing class alright and the same thing for LayoutStyle..
Care to explain why this could be forbidden ? (I'm willing to accept I might be wrong ;)
I am very confused. I am told to only use JFC classes. AWT does not fall under JFC. Am I allowed to use AWTimension and AWT.Tookit? About the Jcomponent thing I was not sure if it fell under the same category as J2EE which is just my speculation. Are we allowed to use JUnit?
Alex Belisle Turcot
Ranch Hand
Joined: Apr 26, 2005
Posts: 516
posted
0
Yucca Nel wrote:I am very confused. I am told to only use JFC classes. AWT does not fall under JFC. Am I allowed to use AWTimension and AWT.Tookit? About the Jcomponent thing I was not sure if it fell under the same category as J2EE which is just my speculation. Are we allowed to use JUnit?
My advice would be not to over complicate the GUI anyway, so you shouldn't anything too fancy.. I'm not sure about Dimension and Toolkit..
I'll let another rancher give his opinion on this..
You are of course allowed to use JUnit.. I simply did not deliver my junit test classes to SUN..
Most of Swing components are on top (inherit from) of AWT. So technically the very low level is AWT.
As for your question about whether to use Toolkit and Dimension to position your window... I did it in my project. I use Toolkit to get user's screen size (a Dimension) then calculate the window's X and Y position on screen passing in a Rectangle (which indeed in AWT not Swing).
Even the commonly used layout managers (eg Flow, Border etc) are in AWT. So how possibly can you not use AWT to support your Swing GUI?