• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using java.awt.* in implementation of GUI

 
Gonella Jayprakash
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The programming assignment specifically mentions:
------------------------------------------------------
It must be composed exclusively with components from the Java Foundation Classes (Swing components)
------------------------------------------------------

But in the implementation I am to use certain AWT classes, for example GRIDBAGLAYOUT and GRIDBAGCONSTRAINTS. Can I use these classes in the implementation of the GUI?

I have searched the forums for the answers and I could find that the above classes can be used.
I just wanted to make sure that the information is latest. So I am posting the question.

Thanks & Regards,
Jayprakash
 
Lucy Hummel
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jayprakash,
GRIDBAGLAYOUT and GRIDBAGCONSTRAINTS are basic classes that are used also by/for Swing.

That is why I do not see a valid point NOT to use them.

To stress out, I think there are okay. I also use some awt-classes.
 
Bod Toki
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you should use them. When writing swing code, you'd always need classes of the java.awt package and sometimes java.awt.event package (for handling events). Just make sure you are not using a textfield or button (or some other type of gui component) from java.awt when swing has got them (say, JTextField, JButton,...). Good luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic