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
Tag: javafx
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
error in module-info.java file in javafx project
I have been using javaFX for a while now, but a day ago when I crated a new project I noticed that there is a new file created automatically with the name (module-info.java) in the default package, and I can not even delete it!!. the following code is written there: unfortunatily all lines has errors 1ST line : Syntax error
Sequence animations within a for-loop (JavaFX)
I am writing a program that displays an array of animated circles based on the user’s input for them. The user can determine how fast the animation runs and how many circles there can be displayed on the pane. As of now, the code works perfectly fine. But what I want my code to do is to do the animation
java.lang.NoSuchMethodError: ‘boolean com.sun.prism.ResourceFactory.isDisposed()’ JavaFX
I had a perfectly well running non-maven JavaFX project, till I decided to convert it into a Maven project in Eclipse. Now, I created the Maven run configuration and added the same VM arguments in JRE section of Maven run configuration: based on some answers. However I am getting the error : To overcome it, even added a maven dependency:
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