I have a code written using javafx that creates a tableview and then inserts the data given in another file. Im trying to implement a search bar. I want to be able to search the table in the gui and have the matches show up. Any direction? Edit: i understand this question was broad, i wasn’t expecting a…
Tag: javafx
JavaFX invoking Java methods using JavaScript
My application is completely styled in a web document form (HTML, CSS & JavaScript), and I’m only using JavaFX WebView to load it as a normal resource. I would like to invoke a method from one of my classes (a Java code) using JavaScript. Like for example, a simple Hello World to the console: How ca…
Javafx like Callback but without return
I’m looking for a standard Javafx or java interface (if it exists) that acts like a Callback, except that it does not return a value. The standard Callback from javafx.util package is as follows: This is useful when you need to return the value, but I don’t. I’ve looked into Callable<T>…
Retrieve mouse position in JavaFX without event
I want to retrieve the x and y coordinates of the current mouse position before showing a stage. So far, the only way I found to get the mouse position in JavaFX is within a MouseEvent, which does not apply to my situation. Furthermore, I found the possibility to retrieve the position via java.awt.MouseInfo. …
Square GridPane of square cells
My goal is to create a GridView that is resizable, always square and contains an equal number of rows and columns, making their cells also square, similar to a Reversi or Chess board. Here’s a small illustration, the grid is centered horizontally on the content pane. I’ve tried a multitude of diff…
JavaFX Use Chart Legend to toggle show/hide Series possible?
Is it possible to use a chart’s legend to toggle show/hide a series? I got a LineChart with a legend and there are too many Series so you can’t read out the information well. I was wondering if there is a possibility to use the legend to toggle the series to show/hide? Most of the names of my Seri…
JavaFx How to set row background color of specifics rows in TableView
I’m using TabelView with 2 columns: I have a logic which calculate row number, and I need to set the background of this row to red (every several seconds I’m calculating the row and I need to set the caculcated row background to red. I check those Q’s: Colouring table row in JavaFX But it do…
Performance of JavaFx Gui vs Swing
I wrote two simple programs, both draw the same Sierpinski Triangle: One program was implemented using swing, and one using javafx. There is a very significant performance difference, swing implementation being consistently much faster: (In this test case : Swing over 1 sec. Javafx over 12 seconds) Is it to b…
Adding hover listener to cells of a specific column in javafx table
I want to create a OnMouseOver Listener to cells of a specific column of a TableView, such that a popup window should appeared with some message, when I hover to it’s cells. This is how I am creating a table and its columns. So is it possible to do it. I know how to create listeners for rows. But I
JavaFX Image (class) and ImageView with a URL
I know how to use Image with a url there was a good example here https://stackoverflow.com/a/24934324/7159163 However, when I input a URL into the string it doesn’t work although the Javadocs say if it not a URL it will try to find the file. But it is a URL and its just not displaying. All that has been…