Domanda

Maybe the title of my question is not good but actually I don't know how to name it.

So I will try to explain my problem really clearly.

So I want to know if its possible to make like a "ErrorBar" inside my scene. I understand by this to show this element over other node inside the scene for a short time. I have a BorderPane and I want when I have an error in my application (like webservice error) to show the error to the user. And for that I want to move a gridpane from the right to the left of the screen without change my scene (like put this object in the top of the borderpane). I don't have any example with a software who do it but I think some stuff in Javascript can do something like this. Just show a green or red bar in the top of the website event it's somthing already show.

If someone know how to do that it will be great.

Actually I use Java 8 latest version.

Feel free to ask more if you want to know more about my question.

Thanks in advance.

Fische

È stato utile?

Soluzione

I think you can just use a StackPane which allows you to work with "layers". Indeed in the StackPane, each Node you add to it becomes a "layer" and appears above previously added Nodes. Meaning that the latest Node will always be on top. Knowing that, you can add your error message to the StackPane and then, if you use a transition to move it, at the end of the transition you automatically remove the message from the StackPane. Hope it helps.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top