javafx-2

Export Stage into PDF

二次信任 提交于 2019-12-21 06:37:09
问题 IS there any way to export Stage or some other component like BorderPane with visual components into PDF file? I want when I click a button to export the component into PDF file? IS there any example? 回答1: you can send a node to a printer and save it as pdf with a virtual printer public class PrinterNodetExample extends Application { @Override public void start(Stage primaryStage) { Button btn = new Button(); StackPane root = new StackPane(); root.getChildren().add(btn); Scene scene = new

How do i show a context menu when right click on a Pane or an ImageView in javaFX

随声附和 提交于 2019-12-21 06:37:06
问题 I am trying to show a context menu i created, when i right click on a pane or an image view ((on Context Menu Requested)). The problem is they don't seem to have a setContextMenue method, unlike labels and buttons...etc. How can associate a context menu to a node that doesn't seem to accept context menus? @FXML Button button1, button2; @FXML Pane mainPane; @FXML ImageView image; private void initContextMenu() { final ContextMenu contextMenu = new ContextMenu(); final MenuItem item1 = new

Javafx ListView selection bar text color when using CellFactory

て烟熏妆下的殇ゞ 提交于 2019-12-21 06:19:19
问题 Is there any way to change the selection bar text color in a list view? Preferably using CSS. In a TableView, you can use: -fx-selection-bar-text: white; But this does not work for a ListView. UPDATE: The above case happens when using CellFactories to render the cells. lvRooms.setCellFactory(new Callback<ListView<String>, ListCell<String>>() { @Override public ListCell<String> call(ListView<String> list) { return new RoomCell(); } }); In the Cell Factory class, I'd gladly cover the case when

How to click a button on website loaded into JavaFX Webengine

﹥>﹥吖頭↗ 提交于 2019-12-21 05:31:21
问题 I am pretty new to JavaFX. I have successfully loaded a website into my JavaFX application. I would like to log in to the website from my java application. So far I am able to insert my login values to the appropriate input box, but I cannot figure out how to click submit button. Can Someone help me. Here is what I have so far. Here is my controller class. public class Controller implements Initializable{ @FXML protected TextField usernameLogin; @FXML protected TextField passwordLogin; @FXML

How to click a button on website loaded into JavaFX Webengine

本秂侑毒 提交于 2019-12-21 05:31:07
问题 I am pretty new to JavaFX. I have successfully loaded a website into my JavaFX application. I would like to log in to the website from my java application. So far I am able to insert my login values to the appropriate input box, but I cannot figure out how to click submit button. Can Someone help me. Here is what I have so far. Here is my controller class. public class Controller implements Initializable{ @FXML protected TextField usernameLogin; @FXML protected TextField passwordLogin; @FXML

How to deploy a desktop JavaFx 2.0 application correctly using jnlp for 32 and 64 bit?

点点圈 提交于 2019-12-21 05:07:19
问题 I have a jnlp file for deploying my javafx 2.0 application, however, how do I make sure that the users have the correct javafx runtime (32 or 64 bit depending on the jvm present on the machine) and if not, download it and run the application. Assuming that the user does not have a javafx runtime currently installed, the problems that I'm facing mostly with a 64 bit machine with either 32-bit, 64-bit or both JRE's are: 1) The Javafx swing deployment guide mentions to use the <jfx:javafx

JavaFX 2.0 + NetBeans + Maven

旧时模样 提交于 2019-12-21 04:51:38
问题 I am creating JavaFX 2.0 application using NetBeans 7.0.1. When I create project in standard way everything works fine. Unfortunately ;) I need Maven project... I didn't find JavaFX 2.0 in Maven repository, so my pom.xml right now looks like this: <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0<

JavaFX TableView Edit with single click and auto insert row?

若如初见. 提交于 2019-12-21 04:38:16
问题 I used tableview in my program to display few rows it was good . my program is used for accounting and as you know there is alot of data insertion in it and i used the table view and i faced a lot of problem :. problem 1 : when the user want to modify a value he will double click to get edit the cell i want my user to select any row and start typing . problem 2 : in my program the user may insert 100 row for a day of work i need a strategy to adding row automatically for example when he

Fast filtering in javafx tableview

雨燕双飞 提交于 2019-12-21 04:28:08
问题 I need to implement a filter in javafx tableview with huge data (around 100,000 ), I have tried this tutorial. It works but filtering is really slow as compared to swing sorting and filtering, code. Can anyone help me to increase speed. What is happening right now is as I type textproperty change fire up and filterdata but it is slow, I need something which shows filter result with typing quickly as happening in swing. thanks in advance. p.s I have also looked at this. 回答1: You may use

How to analyze incoming message (JavaFX on Android)

。_饼干妹妹 提交于 2019-12-21 02:59:29
问题 I ported my JavaFX application to my Android device. I want my application to read incoming SMS messages and store it in a database. I found several questions here in StackOverflow but I don't know how to implement in a JavaFX approach. Please help! 回答1: These are the required steps to create and port a JavaFX application to an Android device, so you can track SMS messages, allowing: sending SMS to the number you type. Warning: This may by subjected to costs to your mobile account. reading