javafx

SceneBuilder Tooltip over Label JavaFX

夙愿已清 提交于 2020-01-13 09:07:26
问题 If I have a label with a text that's too long and I want a tooltip that shows the entire label text when I hover over the label with my mouse. Is that possible to do in SceneBuilder or do I have to do it programically for all my labels? 回答1: Under "Miscellaneous" in the Library pane (left side), you will find a "Tooltip". Just drag it and drop it onto the label in the Hierarchy pane below. Then you can select the tooltip and configure the text, etc. 来源: https://stackoverflow.com/questions

How to work with canvas and text in javafx

两盒软妹~` 提交于 2020-01-13 06:34:28
问题 I am new to JavaFX and I am trying to display a rational number. For example for the number 5/7 I want the program to show the following: Here is the code I've tried to use in order to get the result (but it shows nothing but a blank white pane): import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.layout.VBox; import javafx.scene.text.Font; import javafx

Java error on CSS

做~自己de王妃 提交于 2020-01-13 06:26:11
问题 Today java is going crazy with CSS styling, I think it could be a problem of dependencies, my dependences are: <dependency> <groupId>com.jfoenix</groupId> <artifactId>jfoenix</artifactId> <version>1.11.0</version> </dependency> <dependency> <groupId>org.controlsfx</groupId> <artifactId>controlsfx</artifactId> <version>8.40.13</version> </dependency> <dependency> <groupId>de.jensd</groupId> <artifactId>fontawesomefx</artifactId> <version>8.9</version> </dependency> and the errorr is: Dic 22,

White Screen is appearing in javaFx application & its getting stuck

心已入冬 提交于 2020-01-13 06:21:09
问题 We are developing video streaming app using JavaFx and JavaCv, While playing Stream into gridPane(8X8), we are occasionally facing splashing White Screen issue and it's continuous. Details:- new Thread(new Runnable() { @Override public void run() { frameGrabber = new FFmpegFrameGrabber(Url); frameGrabber.setVideoOption("preset","ultrafast"); frameGrabber.setOption("rtsp_transport","tcp"); frameGrabber.setOption("stimeout" , "60000"); frameGrabber.setAudioChannels(0); frameGrabber

JavaFX transparent window only receives mouse events over drawn pixels

為{幸葍}努か 提交于 2020-01-13 05:53:11
问题 I'd like a Stage that is the same size as the screen which is fully transparent and receives mouse events anywhere. In the example below I get mouse events only when the mouse is over the circle. I see this issue on both Windows XP and Windows 7 using Java 8u11 import javafx.application.Application; import javafx.geometry.Rectangle2D; import javafx.scene.Scene; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape

Java 8 parallel forEach progress indication

隐身守侯 提交于 2020-01-13 04:37:32
问题 For performance reason I would like to use a forEach loop of a parallel Lambda stream in order to process an instance of a Collection in Java. As this runs in a background Service I would like to use the updateProgress(double,double) method in order to inform the user about the current progress. In order to indicate the current progress I need a certain progress indicator in form of a Integer counter. However, this is not possible as I can only access final variables within the Lambda

JavaFX: Binding a TextProperty (eg. Label) to a simple Integer

蓝咒 提交于 2020-01-13 04:11:52
问题 The general question: Is there any way to update a label when the value of a simple integer changes ? I'm talking about simple int's and not stuff like ReadOnlyIntegerWrappers. I've tried the following according to Converting Integer to ObservableValue<Integer> in javafx (I had to change the identifier (is that what it's called ?) of ObservableValue from Integer to String because I couldn't find a way to bind it to the TextProperty otherwise) I've included my demo code below which somehow

Getting the global coordinate of a Node in JavaFX

这一生的挚爱 提交于 2020-01-12 14:24:07
问题 How can I get the actual position of a node in the scene . The absolute position, regardless of any containers/transforms. For example, I want to translate a certain node a so that it would temporarily overlap another node b . So I wish to set his translateX property to b.globalX-a.globalX . The documentation says: Defines the X coordinate of the translation that is added to the transformed coordinates of this Node for the purpose of layout. Containers or Groups performing layout will set

How to improve Javafx 3d performance?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-12 10:51:29
问题 I am doing a javafx visualisation application for 3d points. As I am new to javafx, I started from the tutorial provided in the oracle website: http://docs.oracle.com/javase/8/javafx/graphics-tutorial/javafx-3d-graphics.htm#JFXGR256 The example above runs perfect on my Mac, But after adding more points, the mouse drag, which causes the camera to rotate and thus people can view the objects from different angle, became very slow and simply not applicable any more. I currently have a data for a

Remove blue frame from JavaFX input field

老子叫甜甜 提交于 2020-01-12 07:48:06
问题 Is there a way to remove the blue frame from input filed? 回答1: The blue border you are showing is the focus border. To remove it entirely, use something like textField.setStyle("-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ;"); or in an external css file .text-field { -fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; } To make it the same as the unfocused text field, use .text-field