javafx

How to add negative values to JavaFx Area Chart?

混江龙づ霸主 提交于 2019-12-24 13:18:23
问题 I'd like to draw a difference (area) chart, something like this: How would d3.js difference chart example work with json data? where my chart is centered around horizontal (y=0) axis. JavaFx's Area chart seems to know how to fill only the area below the line!? Example "Adding negative value" (Fig 33-7) seems to be what I'm looking for (March series) BUT it does not work/render as shown! Instead of: it renders: Thanks, Igor 来源: https://stackoverflow.com/questions/30185035/how-to-add-negative

JavaFX: TreeTableView and expanding items without children

我们两清 提交于 2019-12-24 12:25:06
问题 I have TreeTableView with items. I want that user see the "arrow" to expand even if item has no children. The reason is very simple - lazy load. When user clicks at arrow program checks if there are possible items (for example in DB). If children for this item exist then they are added to item. If they don't exist the "arrow" must disappear. How to do it? 回答1: The Javadocs for TreeItem show an example that basically does this. You can override the isLeaf and getChildren methods to lazily

Using JavaFX (JDK 1.8.0_40) in Eclipse Luna does not show the SceneBuilder to create the UI

大憨熊 提交于 2019-12-24 12:19:38
问题 I am new to JavaFX. When I try to build a simple JavaFX program in Eclipse Luna. after I created the new FXML Document, I try to open the .fxml file through the scenebuilder, Eclipse shows the following message in the editor: "opening the file with scene builder failed. Try setting the absolute path to scenebuilder in your the preferences" Any hints how to solve this Problem? 回答1: There is setting to set the path to the Scenebuilder in Eclipse. Go to the preferences and search for the JavaFX

Is possible to make a circular Pane in JavaFX?

家住魔仙堡 提交于 2019-12-24 12:05:05
问题 I want to make a circular Pane (AnchorPane) instead of a "traditional" square. Anyone know how I can do that ? JavaFX. 回答1: There's already an implementation of a CircularPane on the JFXtras project. Have a look at this link for the code. Download the samples jar to test it: 来源: https://stackoverflow.com/questions/28181436/is-possible-to-make-a-circular-pane-in-javafx

How to import database data into combo box in javafx

瘦欲@ 提交于 2019-12-24 11:37:30
问题 Using this code I Initialized Combo box @FXML private ComboBox category; And get value using: String Category = category.getValue().toString(); And inserted value to mysql database. Now before inserting next value in category Combo box I need to import the values in the database to the drop down in Combo Box and value should be displayed in the combo box. 回答1: I recommend to read the values from the database and save it into a ObservableList, once you get all the values you can fill the

JavaFX rendering issue on OSX after java upgrade

你。 提交于 2019-12-24 11:35:43
问题 My app with javafx 3D objects was working fine until I upgraded java from 8u51 to 8u60. After the upgrade, the UI is displayed upside down. Here is what I get with the following test code. It seems the y axis is reversed in rendering but not in functionality. I have tried to put -Dprism.order=sw as a VM option. This fixes the test problem, but then does not allow javafx 3D objects to be rendered. Does anyone knows how to fix this java/javafx issue. I will try to download and install Java 8u51

How to get appointment details when an AppointmentPane is clicked - JFXtras

て烟熏妆下的殇ゞ 提交于 2019-12-24 11:28:48
问题 I would like to print out an appointment's summary and description when a user clicks on a particular appointment retrieved from the database. I'm trying to implement this with something like: lAgenda.selectedAppointments().addListener(new ListChangeListener<Appointment>() { @Override public void onChanged(Change<? extends Appointment> c) { System.out.println(c.toString()); } }); I however, only get this: com.sun.javafx.collections.NonIterableChange$GenericAddRemoveChange@1ef0f08 com.sun

Why does my javafx stage not want to load

安稳与你 提交于 2019-12-24 11:27:57
问题 This is the java import javafx.application.Platform; import javafx.embed.swing.JFXPanel; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.stage.Stage; public class mains extends Stage { public static void main(String[] args) { new JFXPanel(); Platform.runLater(new Runnable(){ @Override public void run() { new mains(); } }); } void go(){ new JFXPanel(); new mains().show(

How to bind the text of a textarea in fxml to a custom property in the controller?

我只是一个虾纸丫 提交于 2019-12-24 11:27:53
问题 I have a fxml file: <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <HBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="my.AppController"> <children> <TextArea prefHeight="200.0" prefWidth="200.0" text="${ddd}"/> </children> </HBox> You can see I want to use ${ddd} to bind

Swing to JavaFX2.0

为君一笑 提交于 2019-12-24 11:27:05
问题 I’m moving from Swing to JavaFX2.0. I have an internal service with various JFrame windows to display/alter internal parameters. I have a menu with buttons. Each button kicks off one of the JFrame windows as such: new ASvr().setVisible(true); Works fine. Now going to JavaFX2.0: Each “window” is an independent FXML application. The independent FXML applications run as standalone applications when the service is remote using RPC to communicate with the service. This is the internal version