repositioning buttons!!

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2008
Posts: 46
Reputation: zyaday is an unknown quantity at this point 
Solved Threads: 1
zyaday zyaday is offline Offline
Light Poster

repositioning buttons!!

 
0
  #1
Nov 18th, 2008
I want to put the buttons on my screen wherever i want, i'm not using design view. Is there any layout method or any other method i can use to reposition my buttons.PLEASE HELP!
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,416
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 257
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: repositioning buttons!!

 
0
  #2
Nov 18th, 2008
Any layout you want. There are lots of them, see the API and read every class that ends with "Layout".

Now, if you can tell us how it should look, and/or exactly what you mean by "reposition my buttons", we might be able to better help you. Generally though, you need to remove them, then add them in their new position (regardless of the layout used).
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 46
Reputation: zyaday is an unknown quantity at this point 
Solved Threads: 1
zyaday zyaday is offline Offline
Light Poster

Re: repositioning buttons!!

 
0
  #3
Nov 18th, 2008
so what i want is other arrangements than the SOUTH,or NORTH, EAST.......given by the layout manager, I'm lookin g for sth that places the button according to the X-Y coordinates, I want to be able to explicitly choose the x-y positions,
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,416
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 257
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: repositioning buttons!!

 
0
  #4
Nov 18th, 2008
Then check the API. You're talking only about the BorderLayout, you can use "x-y coordinates" (although not as you probably think) with GridLayout and (even better but much more difficult to get correct) with GridBagLayout. If you want to use "real" coordinates (i.e. pixel locations) then set the layout to null. I strongly advise against this though.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 46
Reputation: zyaday is an unknown quantity at this point 
Solved Threads: 1
zyaday zyaday is offline Offline
Light Poster

Re: repositioning buttons!!

 
0
  #5
Nov 18th, 2008
thanks, i will see how that goes.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC