javafx

JavaFX Text Selection background

£可爱£侵袭症+ 提交于 2021-01-29 11:45:19
问题 It is possible to set the fill for a selection area in a javafx.scene.text.Text . setFill(RED); However, there seems to be no equivalent setBackground(BLUE) public class Main extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) throws Exception { Pane p = new Pane(); Scene s = new Scene(p); s.getStylesheets().add("main.css"); primaryStage.setScene(s); primaryStage.show(); addTextWithSelection(p); } private void

Why can't I compile maven with OpenJFX and Deeplearning4J?

二次信任 提交于 2021-01-29 11:22:33
问题 I have a small issue that I don't know how to solve. I have started a simple basic JavaFX application and my pom.xml file looks like this: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>se.danielmartensson</groupId> <artifactId>JNonlinearControl</artifactId> <version>0.0.1-SNAPSHOT</version>

Embedding JavaFX in Swing

时间秒杀一切 提交于 2021-01-29 11:09:04
问题 This is my first question here so I'm a bit nervous, but let's get straight to the point. I'm trying to embed a JavaFX scene in a JFrame and I don't seem to quite succeed. The scene sometimes renders properly, but other times it's just grey background. I've been trying to think of a solution for the last couple days, but I just can't seem to find one. Here's the code: public class Popup { public Popup() { SwingUtilities.invokeLater(() -> { JFrame frame = new JFrame("popup"); frame

javafx send back data to previous controller

◇◆丶佛笑我妖孽 提交于 2021-01-29 10:16:31
问题 I have two different controller with two different FXML view. First controller is CashierController,there is button inside to open new scene and with new controller AddProductController. In this cashiercontroller the was cart to initialize to populate the tableview based on cart item. Second, open Addproductcontroller when click that button with new scene while prev cashiercontroller still open.inside AddProductController have the gridpane,when choose any cell inside the gridpane will add the

ScenicView 8.7.0 does not load the opened JAVA FX application in it to inspect the elements

断了今生、忘了曾经 提交于 2021-01-29 09:40:55
问题 I have ScenicView 8.7.0 installed with JDK 8. I need to inspect the JAVA FX application which is running on Ubuntu 16.04(Hope Linux version is not the concern). ScenicView does find the opened JAVA FX application as per the following logs, but in UI of ScenicView, no application is getting displayed. ["Scanning for JavaFX applications" message displayed in ScenicView with endless spinner]. Any help appreciated. At ScenicView terminal logs I am getting following lines Platform running

JavaFX creating a game board with GridPane

久未见 提交于 2021-01-29 07:58:37
问题 When the application is run the game board shows fine, although when a tile is clicked the text always shows in the top left corner of the board [0][0]. Also I am struggling with the logic. I have a int board matrix with a function makeMove which to add a players move to the matrix, although I can't get the player to make a move on the matrix and also print a corresponding "O" on the tile index. How would I create a function that can be passed a row, col index and alter the board matrix and

Checkbox and ComboBox javaFX [closed]

倾然丶 夕夏残阳落幕 提交于 2021-01-29 07:17:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Improve this question i'd like to find out, which CheckBoxes are checked and which are unchecked by one method. Furthermore, i'd like to find out how can i add label in ChomboBox, E.G. there are numbers to choose, and from 1-9 there is heading "weak",from 10-20 there is heading

JavaFX Adding multiple XYChart.Series to LineChart without explicating declaring each series

前提是你 提交于 2021-01-29 06:36:31
问题 I have been going through the following tutorial for creating JavaFX graphs https://docs.oracle.com/javafx/2/charts/line-chart.htm My question is, how can I dynamically create and add new series of data to my LineChart without explicating declaring each series i.e. series1, series2? When I compile and run my program only a single series has been added. Here is my code Main class that creates the LineChart and instantiate 10 different companies. public class StockChart extends Application {

JavaFX FXML:How to create new instances of a self made fxml to VBox

◇◆丶佛笑我妖孽 提交于 2021-01-29 06:17:04
问题 I created a card like pane so that I can add data to it and create a page with many cards according to data (much like a card layout in mobile applications) however, I don't know how to add new instances of this to VBox. I tired with and without a loop and still didn't work. It Keeps Giving the Following Error: javafx.fxml.LoadException: /C:///////bin/application/HotelReservation.fxml at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601) at javafx.fxml.FXMLLoader.loadImpl