Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem related to java.awt.package

 
waleed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm studying the java.awt.package and in Layout manager the problem which i'm facing is
"Suppose i want to make a Form in which i want to adjust the Button's according to my own will or simply i want to adjust anywhere so which code i will use for the adjustment of Button's" .I have already Applied GridLayout,BorderLayout and FlowLayout manager in my code but their is a special command for the Adjusment of button .If any one knows about this plz guide me properly.
Thanks"
 
leena rane
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To adjust the Button's according to your will :
setLayout(null);
now use,
setBound() method to place components anywhere u want.
But this is not recommended at all for various reasons like:
even if it looks good on our platform ,it could ackward on some other platform.
Hope this helps
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Waleed,
I'm going to move this over to the AWT forum as the question is not related to Mock Exam Errata.
Also, please read the JavaRanch Name Policy and re-register using a name that complies with the rules.
Thanks for your cooperation.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic