javafx

Combinate .jar library with my .jar

醉酒当歌 提交于 2020-01-07 08:31:29
问题 I have a project in javaFX and I'm using ControllerFX Library , the problem here in the .jar file it's necessery to keep .jar file of the library with my .jar project. is there a way to combine .jar of library with .jar of project using intellij idea ? does Maven help in this situation? (I don't know exactly what maven can do) thanks for answers 回答1: The jars that you use with your project are called as the dependent jars . You can bundle them while creating a jar of your own project.

FXML Initialize() throws InvocationTargetException

心不动则不痛 提交于 2020-01-07 08:23:27
问题 Im trying to set the text of a button on the initialize() method but it throws me InvocationTargetException, its the same if I try to get any items on the FXML. FXML: <VBox fx:id="vbox" alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="450.0" spacing="40.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="instaj.LoginController"> <children> <ImageView fitHeight="150

Understanding getStyleClass().add() and a few lines of code

耗尽温柔 提交于 2020-01-07 05:34:11
问题 A few days ago I managed to create a custom button with JavaFX by creating a simple button and modifying it's style using the setStyle() method with String objects (whose values vary depending on if the button was clicked or not) as parameters. I didn't know how to convert that customized button into a class that I can import each time that I want to use it, so I've been researching and I found this project, which includes several JavaFX controllers customized with Material Design. The

Image collision/intersection in JavaFX

我只是一个虾纸丫 提交于 2020-01-07 04:30:32
问题 I am trying to develop a game in javaFX where score will be updated and obstacle will be invisible when two images will intersect.But unfortunately,in the game score is updating continuously. I think i can not make the image invisible properly in game. Here's the full code of related class: package minion.Model; import javafx.animation.TranslateTransition; import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Group; import javafx.scene.Scene; import javafx

JavaFX TableView edit not editing

蹲街弑〆低调 提交于 2020-01-07 04:19:13
问题 In JavaFX 8 I'm trying to get a cell to edit after a new row has been added to the table, to optimize the experience for the user. hourTableView.getSelectionModel().select(newHour); int row = hourTableView.getSelectionModel().getSelectedIndex(); hourTableView.edit(row, hourTableAmountTableColumn); The correct row is selected, but the cell does not go into edit mode. Well, I have seen it happen very incidentally, but hardly reproducable. What am I doing wrong? 回答1: found the solution in Insert

how to debug a javafx application for android in eclipse

江枫思渺然 提交于 2020-01-07 04:08:05
问题 I create a big JavaFX application that works fine in desktop. In Android, its size is about 20 Mbytes. Now, for deploying it for Android, I have installed Gluon (JavaFxPorts). With a small program (using the JavaFX transitions notions, timeline, ...), I have generated an .apk by calling the androidInstall gradle task. That works fine, except I cannot automatically install the .apk file in my phone. I do copy/paste from my desktop to my phone. BUT, when I want to do the same process with my

How to show a list on table column, with few fields of list items

早过忘川 提交于 2020-01-07 03:34:53
问题 UPDATE : This qustion moved to TableColumn should only show one specific value of a complex data type because it's more specific I want to populate a table with a complex data type Person containing name , id and a List<Person> . At the moment I get a table with the correct name , id and a third column with the whole information of other Person s but it should only show the name of the Persons s. Is there any way that my third column shows only the Person.getName() values? Keywords, solutions

How do I create KeyEvents in Java FXML?

狂风中的少年 提交于 2020-01-07 03:27:11
问题 I created this small project to test key events. But when I press keys, it isn't behaving as I want. Actually I need key events for my Calculator project. I created a Calculator project and aside from mouse clicks, I want to add a feature where numbers or operators can be typed from a keyboard. Can anyone check this and help make it more functional? public class FXMLDocumentController implements Initializable{ @FXML private Label label; @FXML private Button backSpace; @FXML private Button

JavaFX - TableView doesn't update items

非 Y 不嫁゛ 提交于 2020-01-07 03:21:12
问题 I'm programming a little vocabulary trainer for my wife using JavaFX. Each word stores it's own statistic values like how often she encountered the word and how often she provided a correct answer. I've set up a TableView for that, but after a training session the stats won't update. The word objects themselves have the right values but they're just not shown in the TableView. Usually the TableView always displays the current values of on object due to the nature of ObservableList, right? Not

CSS on Java Swing from Java Code

自古美人都是妖i 提交于 2020-01-07 02:08:10
问题 I am designing a eclipse plugin, where i use Components of Swing and JavaFx. In this I can apply CSS on JavaFX. But i could not apply CSS for Swing components. I was forced to use Swing component for some features of the plugin. So i would like to apply CSS for Swing components too. Is there any api that supports CSS on Swing component? //This code applies css for javafx components SwingJavaFxSample.class.getResource("samples.css").toExternalForm(); Please help me in applying css for Swing