javafx

JavaBean wrapping with JavaFX Properties

ε祈祈猫儿з 提交于 2019-12-27 11:06:14
问题 I want to use JavaFX properties for UI binding, but I don't want them in my model classes (see Using javafx.beans properties in model classes). My model classes have getters and setters, and I want to create properties based on those. For example, assuming an instance bean with methods String getName() and setName(String name) , I would write SimpleStringProperty property = new SimpleStringProperty(bean, "name") expecting that property.set("Foobar") would trigger a call to bean.setName . But

Returning values from thread

[亡魂溺海] 提交于 2019-12-26 16:33:09
问题 I am running selenium tests inside a for loop which takes time. I needed to indicate the progress of those tests using javafx progressbar . So I replaced the code inside for loop with a task. Following is my code The runTests() method returns a String which is displayed as an Alert I cannot return a String from inside Task<Void> as the return type is Void The test code is inside runTest(data) method which returns true or false @FXML private void handleRunTestButton(ActionEvent aEvent) throws

Java FX TextField blur

隐身守侯 提交于 2019-12-26 00:16:28
问题 Can anyone tell me why sometimes JavaFX displays the content of a TextField with a blur effect on it? It seems to be random and occurs in any of my TextField s. Please see the image attached. 回答1: Focusing on the intermittent rendering artifact mentioned here, the 2 glyph looks like it's been rendered twice, with one copy shifted horizontally relative to the other. Such apparently random anomalies are notoriously difficult to identify. Myriad causes may include incorrect synchronization,

Java FX TextField blur

╄→гoц情女王★ 提交于 2019-12-26 00:16:02
问题 Can anyone tell me why sometimes JavaFX displays the content of a TextField with a blur effect on it? It seems to be random and occurs in any of my TextField s. Please see the image attached. 回答1: Focusing on the intermittent rendering artifact mentioned here, the 2 glyph looks like it's been rendered twice, with one copy shifted horizontally relative to the other. Such apparently random anomalies are notoriously difficult to identify. Myriad causes may include incorrect synchronization,

View html from archive using WebView

南楼画角 提交于 2019-12-25 18:41:53
问题 I have zip-compressed file, which contains a set of html pages. I need to load html-pages from it. I need to redefine the mechanism of resolve of links. It is possible using WebView javafx? 回答1: If I understand well your question. I'm guessing that you need to open html files. I extracted the next code from javafx 2 tutorial from Oracle WebView browser = new WebView(); WebEngine webEngine = browser.getEngine(); webEngine.load("http://mySite.com"); The load function takes a regular URL, so you

Build failure for JavaFX android app using the gluon mobile plugin

删除回忆录丶 提交于 2019-12-25 18:40:08
问题 I just started a new gluon mobile multi view project with FXML and tried to run it before changing anything (apart from updating the jfxmobile-plugin version in the build.gradle file from 1.2.0 to 1.3.2). it works fine on desktop, but when i try to run the androidinstall gradle task (with my android phone connected) it fails. It gives me the following error: :mergeClassesIntoJar :shrinkMultiDexComponents :createMainDexList :writeInputListFile [ant:java] Java Result: 1 :dex FAILED FAILURE:

Javafx rotation [closed]

三世轮回 提交于 2019-12-25 18:36:44
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year . I have an application in which I draw a rectangle and then turn it 90 degrees. In this case, I have a frame with which I can move my rectangle. But after I turned it (an example of 90 degrees), when the region moves up, the rectangle itself moves to the right. When rotating, what does the coordinate

Google's Admob library integration import cannot be resolved in javafx

给你一囗甜甜゛ 提交于 2019-12-25 18:36:08
问题 I'm having some issues about Google's AdMob integration on my gluon project. I'm following the answer at this link: Gluon mobile cross-platform adsView At the step 3 i have this problems about imports: The import android cannot be resolved The import com.google cannot be resolved The import javafxports cannot be resolved I've already checked other answers about this kind of problems on other topics but noone of them solved my problem. Can anybody help me to solve the problem? Thanks in

ComboBox in JavaFX application doesn't show the data

江枫思渺然 提交于 2019-12-25 18:24:36
问题 I have class: public class Element { private final IntegerProperty id; private final StringProperty name; ...constructors... public Integer getId() { return id.get(); } public void setId(Integer id) { this.id.set(id); } public IntegerProperty idProperty() { return id; } public String getName() { return name.get(); } public void setName(String name) { this.name.set(name); } public StringProperty nameProperty() { return name; } @Override public String toString() { return name.get(); } And I try

Adding and selecting ChoiceBox that's inside a TableView

拜拜、爱过 提交于 2019-12-25 18:16:07
问题 So I'm trying to add a ChoiceBox for every variable inserted in the TableView. Users.java: Users(String userName , Integer userAge , ChoiceBox employed) { this.userName = userName ; this.userAge = userAge ; this.employed= employed; } //getters and setters Main.java: ObservableList<Users>userList = FXCollections.observableArrayList(); TableView<Users> userTable = new TableView(); TableColumn<Users, String> nameCol = new TableColumn(); TableColumn<Users, Integer> ageCol = new TableColumn();