Skip to main content

[French beginner] Put a rectangle in front of an other rectangle

1 reply [Last post]
danyboy85
Offline
Joined: 2006-05-05

Hello,

in my JavaFX application, i put a rectangle behind an other one. I can see it because it is larger than the rectangle which is in front of it.

When i click into the rectangle which is behind, i want this rectangle be in front of the other one.

I saw that it exists 2 methods : toFront() and toBack() but it seems that they don't work.

Thank you for your responses.

(I hopes that my english is not too bad...)

Dany

Message was edited by: danyboy85

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kram
Offline
Joined: 2007-10-23

After a small amount of digging, I found that there was a UI bug in the toFront() and toBack() methods that caused them to not work correctly.

This has been fixed for the 1.0 release (which according to rumors should be very soon).\

However, (and this might not work) apparently the 2 methods work backwards. Can you try to use toBack() instead of toFront(), and see if that works?

Here is the link I used to get this information:

http://markmail.org/message/jpmy6nq3buyjd6ro#query:javafx%20toFront+page...