javafx-8

TreeView in a table cell Java FX 8

[亡魂溺海] 提交于 2019-12-11 19:32:21
问题 I have a TableView in my UI, it displays an user list from the database. One of the column of this table is editable, when editing is enabled the cell of this particular column becomes a treeview, listing various options which can be chosen. Just to clarify, I am trying to implement a Datepicker or a colorpicker like functionality on a table cell, but with my own list of items as a tree. The table is defined like this private TableView<User> userTable; The particular column which displays a

TableView items are not removed but do not respond

一笑奈何 提交于 2019-12-11 19:17:46
问题 Firstly, I am working on Windows 7, Netbeans 8, JDK 8. I have a TableView containing POJO objects (not using properties). I am trying to implement " search while typing " but something strange happens. In this image you can see that ALL the students are being displayed: In the next picture after the search is done you can see the problem. First 4 students are the actual search results and are clickable active entries in the TableView . All the others entries are visible but not responding,

How to Change language of textbox in javafx on click of a button?

て烟熏妆下的殇ゞ 提交于 2019-12-11 18:27:25
问题 I want to build a chat Application in JavaFx in which there will be a button that lets user switch between languages English and Hindi (Indian regional language).The problem is I am not able to figure out how am I suppose to change the language of text of a JavaFx Textbox when the user clicks the button. I have not yet started developing my project because of this problem. Plz just give me a demo program that changes the text in the textbox when a button is clicked. Thanks!!! EDIT: I Tried

Function setOnKeyPressed is not working on DatePicker in Javafx?

南楼画角 提交于 2019-12-11 18:08:32
问题 Function setOnKeyPressed is not working on DatePicker. I want to change the focus from first datepicker(startYear) to second datepicker(endyear) whenever Enter or Down key is pressed, but its not working. I'hv tried the following code. Please help me out...!! package datedemo; import com.sun.javafx.robot.FXRobot; import com.sun.javafx.robot.FXRobotFactory; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Calendar; import javafx.application.Application;

Get rid of duplicated border on javafx.scene.control.TextField

倾然丶 夕夏残阳落幕 提交于 2019-12-11 17:24:31
问题 I'm working on a TextField and just get a strange "extra border" I can't identify where it is comming from. My UI looks like this (the extra border is in grey, the ordinary border I painted red in my CSS for debug): FXML excerpt: <HBox fx:id="sliderControlPane" styleClass="parameterSliderControlPane" alignment="CENTER" visible="false"> <Slider fx:id="parameterSliderControl" styleClass="parameterSliderControl" prefWidth="195" /> <Pane prefWidth="14"/> <TextField fx:id=

Javafx: update TableCell

我与影子孤独终老i 提交于 2019-12-11 16:18:37
问题 I have a TableView and a custom MyTableCell extends CheckBoxTreeTableCell<MyRow, Boolean> , In this cell is @Overridden the updateItem method: @Override public void updateItem(Boolean item, boolean empty) { super.updateItem(item, empty); if(!empty){ MyRow currentRow = geTableRow().getItem(); Boolean available = currentRow.isAvailable(); if (!available) { setGraphic(null); }else{ setGraphic(super.getGraphic()) } } else { setText(null); setGraphic(null); } } I have a ComboBox<String> where I

Error when trying to map a Set type object (Property access method and JPA annotation) not duplicated tho

时光毁灭记忆、已成空白 提交于 2019-12-11 14:10:08
问题 In order to accomplish another task, I need redefine my pojos classes and use property access to take advantage of JavaFX properties in my mentioned classes, but I'm facing this error. org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: deposito, for columns: [org.hibernate.mapping.Column(productoses)] I have already tryied the solutions mentioned in org.hibernate.MappingException: Could not determine type for: java.util.Set and org.hibernate

JavaFX: How to implement a Custom Tooltip

ぃ、小莉子 提交于 2019-12-11 14:07:31
问题 I'm trying to create my own Tooltip class. Basically the tooltip is going to be a Label with a pointer graphic (FontAwesomeView) on the bottom all wrapped inside a vbox . The part i'm stuck at is, how do i show my custom tooltip on the screen without adding it to a parent node? 回答1: You don't need to implement your own tooltip, you can just customize the built-in one. Default tooltip: Customized tooltip: It also works for installing Tooltips on nodes (like shapes) which don't have a

Reference and Guidelines for Dynamic Layout using JavaFX

淺唱寂寞╮ 提交于 2019-12-11 13:53:28
问题 I am using FXML via Scene Builder to establish some JavaFX scenes and formatting templates. Having scanned the web and Oracle tutorials, I still find determining the ' rules ' around how layouts size/wrap/fit-contents/etc. and spacing between elements and compoents to be 90% a black art to me. What I'm missing is the "layout overview" (missing chapter) that puts FXML (and JavaFX) layouts all together. If you've come across such a creature, please share link(s). To date I've only found small

Print Stacktrace into Textarea in JavaFX

情到浓时终转凉″ 提交于 2019-12-11 13:37:15
问题 I would like to print the stacktrace of a throwable into a Textarea Something like this: textArea.setText(throwableElement.toString() + "\n" + throwableElement.printStackTrace()); Is that possible? I hope you can help me Thanks 回答1: You can do StringWriter stackTraceWriter = new StringWriter(); throwableElement.printStackTrace(new PrintWriter(stackTraceWriter)); textArea.setText(throwableElement.toString() + "\n" + stackTraceWriter.toString()); 来源: https://stackoverflow.com/questions/33411873