Skip to content
Advertisement

Tag: javafx

JavaFX Circle Linear Gradient Fill by Percentage

I just want to make an indicator for customer how much he/she used his/hers data/sms/voice using two circles and linear-gradient, but some values are not behaving as wanted. How can I make them behave same as in the image on the left? This is the code I am using to create the gradient: Answer I think what you are looking

How to use methods in extended class and use them in main class

I am trying to create a method in an extended shape class and use it but it doesn’t work. Here is code what I am trying to do: This isn’t complete code, most of it is removed. I have searched over web and couldn’t find anything so came to ask the question. Any help please. Answer means that the variable

How to enable drag for transparent AnchorPane?

I need to make my bottom AnchorPane transparent, and I used below code to do that. It works, but after that I cannot move my application by drag? I cannot move application around the workspace; how can I fix it ? Answer You can see this example But I think there will be a better way

JavaFX Add custom button to HTMLEditor toolbar at position

I have an HTMLEditor where I want to add a button to the toolbar that inserts a table into the editor. I can insert the button, but I can’t get it in the correct position. I want it to appear to the right of the list buttons like so: But instead I can only get it to add to the

Javafx button hover effect

I have a button that changes color when I move the mouse in, but it looks stiff. I want to have a CSS transition color transition effect. Translated with translation tools. I don’t know if you can understand it. Answer Did you try specifying a CSS stylesheet as explained in: Button Hover and pressed effect CSS Javafx CSS Stylesheet file

Bind StringProperty to Label from a Singleton

I have a singleton called MenuText. It is responsible for displaying the correct text in the menu. It gets updated dynamically. I have a fxml file, but the MenuText can’t have a reference to it. (This would contradict the MVVM architectural style) Initially I used <fx:define> to setup a reference to the MenuText from the fxml file, but this doesn’t

Adding JavaFX PieChart in JPanel

I want to add a Pie chart inside a JPanel. I have gone through this and this. But it didnt helped me. I tried this code in the debugger but it is not getting pass line X. Somehow setScene function is not working and pie chart is not visible in the panel. Here’s my code: I am not sure why

Advertisement