943,796 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 431
  • Java RSS
Nov 18th, 2008
0

repositioning buttons!!

Expand Post »
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!
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
zyaday is offline Offline
70 posts
since Jun 2008
Nov 18th, 2008
0

Re: repositioning buttons!!

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).
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Nov 18th, 2008
0

Re: repositioning buttons!!

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,
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
zyaday is offline Offline
70 posts
since Jun 2008
Nov 18th, 2008
0

Re: repositioning buttons!!

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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Nov 18th, 2008
0

Re: repositioning buttons!!

thanks, i will see how that goes.
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
zyaday is offline Offline
70 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Help with my code....
Next Thread in Java Forum Timeline: Is there a universal application ID for sending MMS in J2ME?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC