javafx-8

Please Explain How to Use CheckBoxTableCell

老子叫甜甜 提交于 2019-12-20 10:13:37
问题 I would like to know more about how to practically use or subclass (if necessary) CheckBoxTableCell. There is one specific case I would like to use this class, whereby the check box doesn't bind to the underlying data model property. Suppose that I have a column call 'Select' that has check boxes in them. This column, more or less serve as a visual marker against the row. An user could tick these boxes and then use a button to execute some action against the ticked rows (e.g. delete all

Java fxml app not working - Cannot find symbol error

旧时模样 提交于 2019-12-20 06:40:19
问题 i downloaded a java fxml app from https://github.com/HassanAlthaf/AlarmApplication and when i try to run it a get a "cannot find symbol" error from the MainView.java class. Here is the code from the Mainview.java file import java.net.URL; import java.util.ResourceBundle; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.TextField; public class

JavaFX: How to deserialize dynamically create Area Chart Series?

那年仲夏 提交于 2019-12-20 06:40:12
问题 I am adding series dynamically using list in Area Chart. I want to unwrap the series. I need this because I want to save Area Chart series data in db. When app execute it's like this: User can add series by filling the textfields and by clicking the Add button: What I want is when user click on the Save button it should translate the already added series into data so I can store it in db. But what I've tried it It's not giving me the accurate data. According to series on chat I want to get

javafx how to get selected data from tableview using FXML

瘦欲@ 提交于 2019-12-20 06:14:20
问题 I am working on a project a i want to get the selected data of tableview but i am using FXML. I have codes for no-FXML but i am unable to use it for FXML. code: public class person1 { private final StringProperty firstName = new SimpleStringProperty(""); private final StringProperty surname = new SimpleStringProperty(""); private final StringProperty goodnameof1 = new SimpleStringProperty(""); public person1(String firstName) { setFirstName(firstName); } public String getFirstName() { return

dynamically populate ChoiceBox from editable column in TableView

青春壹個敷衍的年華 提交于 2019-12-20 06:13:14
问题 Basically the question title says it all. I have a column of strings (called type ) in a tableview and a corresponding column of numbers (called size ), each row representing an object CargoItem , which has the two properties type and size . Both columns are editable. The TableView is associated with the corresponding observable list of CargoItem , called cargoList . A ChoiceBox is initially set to the observable list. I have a listener attached to the ChoiceBox, so it can update a TextField

Detect Hyperlink hover in WebView and print the link

拈花ヽ惹草 提交于 2019-12-20 04:55:21
问题 I want to add the hovered Hyperlink from a WebView and display it in a corner. How can i achieve? It should be like Chromes feature: Example-Chrome-Screenshot Example WebView Code with many links: import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.ScrollPane; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import javafx.stage.Stage; public class core extends Application { @Override public void start

How to consume a TAB/Enter KeyPressed on the TextArea, and replace with focustraversal or enter key without using internal API?

随声附和 提交于 2019-12-20 04:38:55
问题 I need to have a control which will wordwrap, add scrollbars, etc - but ignore the enter key and jump to the next control using tab/shift tab. I can't seem to get this right. This is the control I have done, and it seems to just simply stay in the text area. (This was used from an old example online and it seems to work only if the textArea is in the same node as the rest). public class TabAndEnterIgnoringTextArea extends TextArea { final TextArea myTextArea = this; public

How to consume a TAB/Enter KeyPressed on the TextArea, and replace with focustraversal or enter key without using internal API?

試著忘記壹切 提交于 2019-12-20 04:38:27
问题 I need to have a control which will wordwrap, add scrollbars, etc - but ignore the enter key and jump to the next control using tab/shift tab. I can't seem to get this right. This is the control I have done, and it seems to just simply stay in the text area. (This was used from an old example online and it seems to work only if the textArea is in the same node as the rest). public class TabAndEnterIgnoringTextArea extends TextArea { final TextArea myTextArea = this; public

JavaFx CheckBox on TableView does not update model when checked/unchecked

谁说我不能喝 提交于 2019-12-20 04:32:12
问题 i have a TableView with the first column with a check box. I managed to show the checkbox correctly and make it editable, but when i click on the checkbox to check or uncheck, the checkBox changes but it does not update my model. This is how i did it: TableColumn<ContasReceber, Boolean> myCheckBoxColumn = (TableColumn<ContasReceber, Boolean>) tabelaContas.getColumns().get(0); myCheckBoxColumn.setCellFactory(p -> new CheckBoxTableCell<>()); myCheckBoxColumn.setOnEditCommit(evt -> evt

Java FX 8, trouble setting the value of text field

ε祈祈猫儿з 提交于 2019-12-20 04:28:18
问题 I'm trying to populate the value of a text field in Java FX. I have the Main Class,the controller and the fxml.I have bind the fxml file with controller and the appropriate field in it. When i try to set its value, it fails. Main.java import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.FlowPane; import javafx.stage.Stage; public class Main extends Application { private Stage primaryStage; private FlowPane rootLayout;