Bring component forward.

Reply

Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Bring component forward.

 
0
  #1
Mar 13th, 2005
Hi! I have a bunch of Jbuttons which are scattered over each other. Is there a method which will bring the button the user selected to the front of the pack?

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Bring component forward.

 
0
  #2
Mar 13th, 2005
Hi everyone,

You can do this

  1.  
  2. JComponent.grabFocus();

Richard West
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Re: Bring component forward.

 
0
  #3
Mar 13th, 2005
Ta for the info! But it didn't work
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Bring component forward.

 
0
  #4
Mar 13th, 2005
Hi everyone,

Well in that case i not sure how to do it

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Bring component forward.

 
0
  #5
Mar 13th, 2005
Why are the buttons on top of each other in the first place?
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Bring component forward.

 
0
  #6
Mar 13th, 2005
Hi everyone,

Good question server crash. That seems like bad layout programming to me or am i missing something.

p.s - check out my new signature

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Re: Bring component forward.

 
0
  #7
Mar 14th, 2005
You guys are missing something I am creating a scatter field, each star being a button (1700 of them to be exact). Therefor the buttons are placed depending on their x,y attributes and can overlay each other. The user can move sliders to make buttons dissapear to make the scatterfield more accurate towards their query. But when they haven't got a query it would be nice for the buttons to move forward infront of the pack if the user clicks on them. Thanks for the help though
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Bring component forward.

 
0
  #8
Mar 14th, 2005
I'm not sure how to do that, altought it could be possible. My only worry, would be that it depends on the order in which you added them to a container, and the buttons added last got put on top. I'll be searching the internet for a solution and get back to you if I find one.

Originally Posted by freesoft_2000
p.s - check out my new signature
Looks good, but I think you should bold the part at the bottom if you want more traffic..
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Re: Bring component forward.

 
0
  #9
Mar 14th, 2005
Thats great thanks. Yeah i was thinking that i might be able to remove and add the button when the user clicks it - might flicker. I will try it anyway.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Re: Bring component forward.

 
0
  #10
Mar 14th, 2005
Sorry for the double post, Im not sure how to edit the above message?

I tried the above and it kinda worked. However other buttons moved around it and it wasn't a very reliable method.
Reply With Quote Quick reply to this message  
Reply

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



Other Threads in the Java Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC