문제

I have a image which I would like to edit with JavaFX. How I could add almost transparent rectangle and text similar to the image below?

enter image description here

도움이 되었습니까?

해결책

Use a VBox to wrap a Label or two and wrap that in a Pane or some other basic node. Style the label to get the desired text appearance, and style the highest node (the one wrapping your VBox) to have a semi-transparent background like so: -fx-background-color: #000000a8;. Change the last two characters ("a8") to achieve the desired level of transparency.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top