• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing

 
Jigge Star
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Should I use layout from awt package in GUI? The instruction saids: It must be composed exclusively with components from the Java Foundation Classes (Swing components).

Jigge
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch Jigge

short answer to your question: yes

Regards,
Darya
 
Michal Charemza
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Slightly longer answer to your question:

I think that

It must be composed exclusively with components from the Java Foundation Classes (Swing components)
means that you cannot use the AWT visual components in the GUI. For example, you cannot use java.awt.Button, but you have to use javax.swing.JButton. I think that there are no swing equivalents to some of the layout/container objects in AWT, so you just have to use them.

Michal
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Michal and Darya. Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic