javafx

Mocked instance of final class in Spock behaves differently in test and dev code

匆匆过客 提交于 2020-06-09 04:12:53
问题 In my JavaFX application I am using Spock and Groovy for testing. I have dedicated WebBrowserController for taking care of my JavafX WebView component. I wanted to test some functionalities that depend on current Location and Document of the WebView . Relevant part of WebBrowserController: public WebEngine getEngine() { return panel.getWebView().getEngine(); } This is how I create an instance of WebBrowserController for my tests. Notice the GroovyMock I used there - ordinary Mock(...) does

Java Multipleclients - server javafx

别等时光非礼了梦想. 提交于 2020-06-01 07:40:31
问题 I have to create an electronic mail with JavaFX using socket, FXML. I need to create one server and 3 clients that are my three accounts and they must start in parallel. Every client must have an associated thread but my problem is: when I start the first client it works, so the FXML file opens. But when I try to open the second client Intellij shows a pop-up that says to me: Stop And Rerun. In my FXML I have a connect button in which I must choose one of my accounts and then my server says

Getting specific elements from arraylist

家住魔仙堡 提交于 2020-06-01 06:25:13
问题 I have a resturant system using java fx, when a customer orders that order is added to the 'customer' class. The customer is then added to the 'table' class. At the end im trying to display each individual customers order by looping through an array list of them and i cant figure out the syntax an arraylist called allcustomers is set like this allcustomers = tbl.getCustomers(); printed out it looks like this [Customer{customernumber=null, customerorder=[burger'7.99]}] im trying to loop

How can i get the data which has been generated using load html feature of JavaFx WebView?

百般思念 提交于 2020-05-31 06:17:11
问题 I have a JavaFx Application where I am loading the HTML page. The HTML generates a Base64 which is being written to a file once it is loaded using Javascript bridge. I am trying to get this Base64 data once it is written from the main class. Can anyone please let me know how can i achieve it ? Below is the code Test.java public class Test { public static void main(String[] args) throws InterruptedException { String input = "[{'name': 'sub','description': 'sub','length': 25,'diameter': {'outer

JavaFX Duplicate children PieChart

限于喜欢 提交于 2020-05-29 03:53:46
问题 I'm writing a program in which on button click data in a pie chart rotates (slice on 10-12 o'clock moves to 12-2 etc). Code below (kinda) works, it rotates, but eats the temp slice and creates whole paragraph of errors. It is my first time trying JavaFX and I'm not really sure how to manage that. private BorderPane layout; private Scene scene; ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList( new PieChart.Data("Post-production age", 424236), new PieChart.Data(

How to execute a PowerShell command from JavaFX

浪尽此生 提交于 2020-05-28 10:45:39
问题 I have this Powershell command that I would like know how to execute from Java / JavaFx: powershell.exe Get-WMIObject Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description,Caption, PNPDeviceID,Status | Out-File -FilePath C:\\path\\to\\file\\test.txt I've read and tried several examples I found online and in forums. But I'm still stuck! This is the JavaFx method I'm using: public void PowerShellCommand() throws IOException { String command = "powershell.exe Get-WMIObject Get

How to execute a PowerShell command from JavaFX

只谈情不闲聊 提交于 2020-05-28 10:44:55
问题 I have this Powershell command that I would like know how to execute from Java / JavaFx: powershell.exe Get-WMIObject Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description,Caption, PNPDeviceID,Status | Out-File -FilePath C:\\path\\to\\file\\test.txt I've read and tried several examples I found online and in forums. But I'm still stuck! This is the JavaFx method I'm using: public void PowerShellCommand() throws IOException { String command = "powershell.exe Get-WMIObject Get

How to execute a PowerShell command from JavaFX

随声附和 提交于 2020-05-28 10:36:57
问题 I have this Powershell command that I would like know how to execute from Java / JavaFx: powershell.exe Get-WMIObject Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description,Caption, PNPDeviceID,Status | Out-File -FilePath C:\\path\\to\\file\\test.txt I've read and tried several examples I found online and in forums. But I'm still stuck! This is the JavaFx method I'm using: public void PowerShellCommand() throws IOException { String command = "powershell.exe Get-WMIObject Get

Java 13: Why are javaFX runtime components missing?

一个人想着一个人 提交于 2020-05-28 07:04:35
问题 Error Message: Error: JavaFX runtime components are missing, and are required to run this application LOOK HERE: project structure photo I have downloaded the javafx extentions for the project as well as the jar file and attached it, the program knows javafx is there since the code errors went away. However, it then said there were no docs and no it says there's no JavaFx runtime components. I have been hiting error after error trying to get javafx to just run a hello world program in eclipse

Java 13: Why are javaFX runtime components missing?

廉价感情. 提交于 2020-05-28 07:02:27
问题 Error Message: Error: JavaFX runtime components are missing, and are required to run this application LOOK HERE: project structure photo I have downloaded the javafx extentions for the project as well as the jar file and attached it, the program knows javafx is there since the code errors went away. However, it then said there were no docs and no it says there's no JavaFx runtime components. I have been hiting error after error trying to get javafx to just run a hello world program in eclipse