File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing components

 
Surya Kumar
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my instruction it says that GUI must be composed exclusively with components from the Java Foundation Classes (Swing components). But i am using the layouts which are from awt. Where ever i am using the getContentPane() i am using a awt component. So my doubt is when it was told that "composed exclusively with " that means only visual components has to be from JFC, and in coding we can use awt components still!! Regards
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LayoutManagers are fine. They are used as part of Swing too, so what they really mean is using JButton from Swing rather than the AWT counterpart.

Mark
 
peter wooster
Ranch Hand
Posts: 1033
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Surya Kumar:
In my instruction it says that GUI must be composed exclusively with components from the Java Foundation Classes (Swing components). But i am using the layouts which are from awt. Where ever i am using the getContentPane() i am using a awt component. So my doubt is when it was told that "composed exclusively with " that means only visual components has to be from JFC, and in coding we can use awt components still!! Regards


AWT may be used along with Swing. It would be impossible to use Swing without AWT as Swing classes almost always extend AWT classes. What you can't use is other widget systems such as SWT or the various Borland extensions. Also you shouldn't use AWT where there is a Swing alternative, so use JFrame, not Frame etc.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic