javafx

Notification in a JavaFX app

北城余情 提交于 2019-12-25 07:08:38
问题 I would like to add a notification to some actions in my JavaFX application. Such as a successful connection to a server, a disconnection to a server, etc ... I tried the NotificationPane from ControlsFX but I can't hide the bar after a short time delay. It seems that you can only hide it after an user interaction. If you know another library who does something similar or even better, I'm looking forward to it. Plus I would like to make my notifications look like that : so it doesn't take the

JavaFX Intellij onAction looks like its not covered in controller

天涯浪子 提交于 2019-12-25 07:05:11
问题 I created a simple Fxml application in JavaFX. I added a button with scene builder and an action called btnExit : Complete FXML file (completely simple and fresh generated) <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.control.Button?> <?import javafx.scene.layout.GridPane?> <GridPane alignment="center" hgap="10" vgap="10" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.65" fx:controller="sample.Controller"> <children> <Button mnemonicParsing="false"

InvocationTargetException when using JavaFX set and get methods

≯℡__Kan透↙ 提交于 2019-12-25 06:58:56
问题 //Max Maier, Milan Radovanovic package application; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; public class Control { private static int anz = 1; int generierteZahl = (int) Math.ceil(Math.random()*100); Label anzversuche; Label zahlenbereich; Button ratenb; TextField eingabe; @FXML void raten(){ if (generierteZahl == Integer.parseInt(eingabe.getText())){ anzversuche.setText(anz + ". Versuche"); ratenb

Cannot install JavaFX app on Android x86_64

女生的网名这么多〃 提交于 2019-12-25 06:58:27
问题 I managed to build a JavaFX app using gradle and javafxport but the apk fail to install on my device. Here is my build.gradle: task wrapper(type: Wrapper) { gradleVersion = '2.4' } buildscript { repositories { jcenter() } dependencies { classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b10' } } apply plugin: 'org.javafxports.jfxmobile' mainClassName = 'java.Main' repositories { jcenter() } jfxmobile { ios { forceLinkClasses = ['java.**.*'] } android { applicationPackage = 'com.superflush.java

fxml file not behaving as expected in OS X

扶醉桌前 提交于 2019-12-25 06:47:52
问题 I am using an fxml file to to create my java fx UI. the file is:- <?import java.lang.String?> <?import javafx.collections.FXCollections?> <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.ComboBox?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.TableColumn?> <?import javafx.scene.control.TableView?> <?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout

JavaFX - How to set values during in fxml controller initialize

百般思念 提交于 2019-12-25 06:44:11
问题 I tried to load an FXML and set the controller with Java code (not with the FXML tag). I have different fields in the FXML. I tried to load (for example textfields, buttons...). Here is the example: Tab tab = new Tab(); tab.setText("TesetTabAdd"); tabpane.getTabs().add(tab); FXMLLoader loader = new FXMLLoader(getClass().getResource("tab.fxml")); TabController tabCont = new TabController(); tabCont.setName("Sandro"); loader.setController(tabCont); try { tab.setContent((Node)loader.load

JavaFX - How to set values during in fxml controller initialize

孤街浪徒 提交于 2019-12-25 06:43:06
问题 I tried to load an FXML and set the controller with Java code (not with the FXML tag). I have different fields in the FXML. I tried to load (for example textfields, buttons...). Here is the example: Tab tab = new Tab(); tab.setText("TesetTabAdd"); tabpane.getTabs().add(tab); FXMLLoader loader = new FXMLLoader(getClass().getResource("tab.fxml")); TabController tabCont = new TabController(); tabCont.setName("Sandro"); loader.setController(tabCont); try { tab.setContent((Node)loader.load

Why JavaFX WebView failed to load [Status : FAILED]

那年仲夏 提交于 2019-12-25 06:33:14
问题 Im really confused why WebView failed to load the following URL: http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm http://www.java2s.com/Code/Java/JavaFX/WebEngineLoadListener.htm After running my code WebEngine's State returns FAILED . But when I tried to run this URL : https://www.google.com.ph/, WebEngine's State returns SUCCEEDED , and it loaded SUCCESSFULLY! WHY ???? Is there some kind of CONFIGURATION that I needed to set in order for those sites to load successfully? Here's

How to print on printer image using javafx8

て烟熏妆下的殇ゞ 提交于 2019-12-25 06:12:09
问题 I have object of javafx.scene.image.Image class. How can I print it on printer using javafx8? Please, note, that I don't want to print some node, for example ImageView. I need to print image. Although it's very simple question I can't find answer in internet. The only code I found is: PrinterJob job = PrinterJob.createPrinterJob(); if (job != null) { boolean success = job.printPage(node); if (success) { job.endJob(); } } However it is about printing the node. 回答1: Problem javafx.print

JavaFX Adding Rows to TableView on Different Page

僤鯓⒐⒋嵵緔 提交于 2019-12-25 06:09:36
问题 Okay, I've been working through some issues with this program and I think I've finally gotten it to a point where I understand what is wrong. I'm trying to follow this tutorial a bit: http://docs.oracle.com/javafx/2/fxml_get_started/fxml_tutorial_intermediate.htm But my program has the add a row on a different FXML page than the Table View is on. I think the program is having trouble connecting the two. I've looked in to trying to find ways to make them talk to each other (put everything in