javafx

How to change values in tableview simultaneously whenever i select an corresponding item from comboboxtablecell

孤人 提交于 2019-12-25 07:51:56
问题 I tried but I got stuck at a point where am getting the corresponding values of the selected item from comboboxtablecell but cannot add the values to the corresponding column in the table view Controller.java public class controller { GetConnection gc = new GetConnection(); PreparedStatement pst; ResultSet rs; Statement st; private ObservableList<Users> datas = FXCollections.observableArrayList(); public controller(){} @FXML private TableView<Users> table; @FXML private TableColumn<Users

TornadoFX JavaFX Sync Scroll across tableviews

风流意气都作罢 提交于 2019-12-25 07:49:11
问题 I am trying to synchronise scrolls across the tableviews. (Both Horizontal & Vertical) The SyncScrollEx View has two tableView which is basically one Fragment placed side by side, with same dataset, and hence same table size layout. Expected Behaviour: When I scroll on one tableview, the other tableview's scrollbar should also scroll for the same amount. Below is my current progress: import javafx.beans.property.SimpleIntegerProperty import javafx.beans.property.SimpleStringProperty import

Cannot call JavaFX from WebView JavaScript on Windows (VirtualBox)

和自甴很熟 提交于 2019-12-25 07:48:11
问题 The following code works on Linux, but the callback does not work on Windows (VirtualBox VM). Can you please tell me why? Java: public class WebViewTest extends Application { private Label label = new Label ("..."); public static void main (String[] args) { launch (args); } @Override public void start (Stage stage) throws Exception { WebView webView = new WebView (); WebEngine webEngine = webView.getEngine (); webEngine.setJavaScriptEnabled (true); JSObject window = (JSObject) webView

Inconsistency calling TextField text in setOnKeyTyped

落花浮王杯 提交于 2019-12-25 07:39:55
问题 I am making a typing test in Java with JavaFX. I want to compare the text that is being typed in a TextField to the defined random words. However, the TextField only updates with the letter just typed sometimes and not all the times. The following code is where this problem is occurring. field.setOnKeyTyped(e -> { String typingWord = field.getText(); if( typingWord.isEmpty() && e.getCharacter().charAt(0) == '\b' && !(typedWords.size() == 0) && typingWord.equals(previousWord)){ field.setText

Javafx Stackpane show similar CardLayout Java Swing

允我心安 提交于 2019-12-25 07:37:06
问题 I use three buttons to display each child panel in stackpane,but when I click the button,it displays different panels per click Example btn0-> pane 0,pane 1and pane 2 btn1-> pane 0,pane 1and pane 2 btn2-> pane 0,pane 1and pane 2 I just want it to display a specific panel for specific buttons in java swing cardLayout should I do? btn0-> pane 0 btn1-> pane 1 btn2-> pane 2 Please help me! @FXML void btn0(ActionEvent event) { stackConsole.getChildren().get(0).toFront(); } @FXML void btn1

Keep Tooltip open as long as mouse is over it

久未见 提交于 2019-12-25 07:32:28
问题 I create a Tooltip for a TableColumn header via fxml like this: <TableColumn> <cellValueFactory> <PropertyValueFactory property="someProperty" /> </cellValueFactory> <graphic> <Label text="Column 1"> <tooltip> <Tooltip text="Tooltip text" /> </tooltip> </Label> </graphic> </TableColumn> I would like to keep the tooltip open if I move the mouse over the tooltip. Eventually I would like to have clickable links in the tooltip text (Just like Eclipse JavaDoc tooltips). Is that possible? Edit :

load a html File inside an WebView and jump direct to an id inside the html

一个人想着一个人 提交于 2019-12-25 07:31:18
问题 I want to load a html File inside an WebView and jump direct to an id inside the html. import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.scene.web.WebView; import javafx.stage.Stage; public class HelpViewer extends Application { public static void main(String[] args) {launch(args);} @Override public void start(Stage stage) { WebView webview = new WebView(); webview.getEngine().load(HelpViewer.class.getResource("HelpViewer.html")

Using showAndWait in JavaFX application

烈酒焚心 提交于 2019-12-25 07:24:36
问题 I'm creating a Login which uses Single Sign On. To do this, if the company a user logs in with is SSO enabled, then a JavaFX WebView will open, allowing the user to login. This login will be entirely web based so no real data capture on my part is required. I have two classes, LoginManager and SSO . LoginManager checks to see if the company is SSOEnabled, and then goes to SSO if it is. From here, I create the UI, and then using Platform.runLater() , go to the method which opens the webview .

Bind the progress of a query to a progressProperty of a ProgressBar for informing the user of download and upload time in javaFX?

眉间皱痕 提交于 2019-12-25 07:19:37
问题 I got an app that upload and download images to a mysql database but this take like 5 secs and i want to tell the user the progress of this i do the transactions in a task here is the code // progres bar indefinit progressBar.setProgress(-1); Task<Void> task = new Task<Void>() { @Override protected Void call() throws Exception { try { //i net to put to sleep the javafx thread for making a connection Thread.sleep(10); } catch (InterruptedException ex) { ex.printStackTrace(); } Platform

javafxports 8.60.7 - using Back button on Android - none exit application

走远了吗. 提交于 2019-12-25 07:17:43
问题 Using only javafxports 8.60.7 for Android (without Gluon Mobile) - when you press the Back button, the application will not exit. How can I fix this? 回答1: While JavaFXPorts allows you running plain JavaFX on Android, there are some platform features not implemented by the OpenJFX project, like the back button you mention. Gluon Mobile deals properly with the back button both in Views and Layers, but if you are not using it, you will have to take care of it. This question already has an answer