javafx

javafx @font-face css error “loadStyleSheetUnprivileged”

匆匆过客 提交于 2020-01-17 13:59:07
问题 I'm trying to load a custom font in JavaFx css using this method @font-face { font-family: 'Roboto'; src: url('fonts/Roboto-Medium.ttf'); } I've done every thing proper with the correct path but I'm getting this error Nov 28, 2015 4:49:18 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face font [file:/C:/Users/RootUser/Desktop/Java8%20projects/RemoteViewer/out/production/JavaFxApplication/application/fonts/Roboto-Medium.ttf] This is my project

Tableview javaFX - The type of getColumns() is eroneous

给你一囗甜甜゛ 提交于 2020-01-17 12:24:49
问题 I have a problem with a getColumns error I simply can't figure out myself. I have searched the internet with no luck. I hope some of you have a great answer for this! Because I am stuck... I have created a Create Member scene where I want to store the information in a TableView after it has been created. I have made a class called Person which makes the getters and setters. In my TableView class I have made a TableView ArrayList which should hold the objects, but with NO luck! The code is

Generate video with ffmpeg for JavaFX MediaPlayer

余生颓废 提交于 2020-01-17 11:12:09
问题 I'm trying to use ffmpeg for generating a video file from timelapse images. Somehow I didn't find out which codec resp. which parameters I have to use in ffmpeg, that the video file is playable with JavaFX's MediaPlayer . I tried these codecs: libx264 ( ffmpeg -f image2 -i %05d.jpg -r 30 -filter:v crop=4000:2250:0:0 -s 1920x1080 -vcodec libx264 -preset ultrafast -qp 0 Timelapse3.mp4 ) mpeg4 ( ffmpeg -f image2 -i %05d.jpg -r 30 -filter:v crop=4000:2250:0:0 -s 1920x1080 -vcodec mpeg4 -qscale 1

How to SetValue Of ComboBox With Given Id Value ?

你。 提交于 2020-01-17 10:45:13
问题 I have tried the code to create a combobox with Id and Value Pair. Now I want to set the value of combobox with the specified Id passed. Example: I want to set the Value of combobox with employee name whose salary is 1400.0 package demo; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.ComboBox; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /** * *

How to SetValue Of ComboBox With Given Id Value ?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-17 10:41:45
问题 I have tried the code to create a combobox with Id and Value Pair. Now I want to set the value of combobox with the specified Id passed. Example: I want to set the Value of combobox with employee name whose salary is 1400.0 package demo; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.ComboBox; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /** * *

javafx setFocus after tabPaine change

五迷三道 提交于 2020-01-17 08:25:54
问题 Problem: Have tabPane tabs OK. In the first tab there is a text field. I am able to get focus on this field when starting the application. After changing the tabs and coming back to the first tab I want focus to be on this textfield (barcodereader should be active in this field) without having to select the field with the mouse. I am able to catch event from tabs with tp.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() { etc (could not post with code) and I am

Set the width of items list in ChoiceBox JavaFX

社会主义新天地 提交于 2020-01-17 08:21:27
问题 I'd like to see the list of items the same width like it's title: But actual picture is: And I haven't found any styles of ChoiceBox's item list in scene builder. Is there any style to add in css file to make items list the same width and position? Current styles: ChoiceBox { -fx-min-width: 28px; -fx-min-height: 42px; -fx-font-size: 16px; -fx-background-radius: 0; -fx-background-color: #ffffff; -fx-border-width: 1px; -fx-region-background: #000000 / -fx-mark-color: #757575; -fx-border-color:

MiGLayout sizing not working properly in JavaFX

点点圈 提交于 2020-01-17 07:11:38
问题 Here's my snippet: package javafxdemo; import org.tbee.javafx.scene.layout.MigPane; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; public class FXDemo extends Application { @Override public void start (Stage stage) throws Exception { MigPane root = new MigPane(); Scene scene = new Scene(root); Button b = new Button("Hello"); root.getChildren().add(b); stage.setScene(scene); stage.setTitle("FX"); stage.show(); }

MiGLayout sizing not working properly in JavaFX

不羁岁月 提交于 2020-01-17 07:11:21
问题 Here's my snippet: package javafxdemo; import org.tbee.javafx.scene.layout.MigPane; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; public class FXDemo extends Application { @Override public void start (Stage stage) throws Exception { MigPane root = new MigPane(); Scene scene = new Scene(root); Button b = new Button("Hello"); root.getChildren().add(b); stage.setScene(scene); stage.setTitle("FX"); stage.show(); }

How to seperate logic from controller JavaFx

烂漫一生 提交于 2020-01-17 07:07:33
问题 I've got an issue with seperating business logic from controller (apart from that how i'm validating data in my program). Here is logic class: public class LogInMechanism { LogInController logInController = new LogInController(); private static int howManyAttempts=0; public void logIn() { howManyAttempts++; if(howManyAttempts <3) { if(logInController.getLogInField().getText().equals("nick") && logInController.getPasswordField().getText().equals("password")) { System.out.println("Button