javafx

Change JavaFX Tab-Button orderring of TextFields from “Left to Right” to “Right to Left” by fxml file [duplicate]

[亡魂溺海] 提交于 2020-01-16 18:34:09
问题 This question already has answers here : JavaFX: How to change the focus traversal policy? (9 answers) Closed 4 years ago . Before asking, i should say that the answer of can be found maybe in JavaFX: How to change the focus traversal policy?, but i don't looking for any java code, i would like a way by editing the Fxml file There is a FXML file that has some TextFields in it and i would like to change focus traversal policy of my TextField : I mean, At the beginning of the application the

JavaFX - Need to pre-fill field through initialize but it won't allow exceptions. Any way around this?

心已入冬 提交于 2020-01-16 18:08:55
问题 I'm trying to code a simple log-in screen that will lead to another program. The user can 1) Login or 2) Sign-up - two different scenes. When the user signs-up the username/encrypted password is saved in a database. When the user is logging-in, he has an option to have the program remember his login details for next time by saving them temporarily on his computer in an XML file. My idea was, to have the program check if an XML file exists on scene load, and if it exists, then pre-fill the

How do I completely edit/delete an element from ListView?

╄→гoц情女王★ 提交于 2020-01-16 18:00:54
问题 Information related to the problem: I have a class ( Shell ) that holds a Map of tasks, declared as: private Map<String, Task> _tabs = new HashMap<String,Task>(); private List<Task> _tsks; //this is the result of the function below: public List<Task> MapToArray() { this._tsks = new ArrayList<Task>(); for(String key : _tabs.keySet()) { this._tsks.add(_tabs.get(key)); } return this._tsks; } My application allows the user to create, edit or delete a Task . Creation: shl.createTab(taskName

Hide the title of a TitledPane in JavaFX 2.2

会有一股神秘感。 提交于 2020-01-16 11:57:29
问题 A TitledPane features a title. Here is how a couple of them can look: The titles are "More..", "Smileys" and "Send". I want to completely hide the Send title, not just remove the text "Send". The end result should be something like this: Is it possible? 回答1: I would just use a standard Pane for the third content area rather than a TitledPane and apply the relevant styles to trick JavaFX into styling the bottom panel as if it was the content area of a TitlePane . Roughly speaking you will

Adjust row height when wrapping text in a JavaFX TableView editable TextFieldTableCell

你。 提交于 2020-01-16 10:15:11
问题 I tested one of the solutions provided here: Wrapping text in a JavaFX TableView editable TextFieldTableCell for the wrapping of the text in a cell of the TableView. The last solution does not work for me, but the one of Pavlo Viazovskyy is fine except that the whole text is only shown when I click in the table. Before the click After the click (either on the table or even in some other windows app) I tried many things, but I am not finding the was to somenow refresh the table view so that it

@FXML public static vars in javafx? [duplicate]

牧云@^-^@ 提交于 2020-01-16 08:04:33
问题 This question already has an answer here : javafx 8 compatibility issues - FXML static fields (1 answer) Closed 5 years ago . I'm introducing in javafx and i found it very interesting. But I have got a problem that i can't solve. In the simplest case of a Hello World I can't put a @FXML public static var like this: public class FXMLDocumentController implements Initializable { @FXML public static Label label; @FXML private void handleButtonAction(ActionEvent event) { System.out.println("You

FXMLLoader cannot find running controller instance and creates new one

佐手、 提交于 2020-01-16 07:07:52
问题 I'm a newcomer when it comes to JavaFX and I recently encountered a problem which really confuses me alot. I'm using a class called "MainController" which controlls an FXML-File containing a TabPane. Each tab is controlled by another controller. But there is one situation in which a tab needs to be deleted, so I need access to the MainController instance to remove the currently active tab from the pane. Whenever I'm using this code to get an instance of the currently running MainController, I

JOGL - Swing - JavaFX

假如想象 提交于 2020-01-16 06:42:49
问题 Ok, I have a working JOGL application. I use a lot of OpenGL features in it including Textures, VBO's, Ray-Picking, etc. I like working with OpenGL directly and don't want to use any other 3D graphics libraries. What I want to achieve is two fold: I want to be able to embed this JOGL application in a subset window of a larger UI window. So alongside the JOGL window will be a photo viewer, text box and scrollable list. I am designing this application to run on Windows 10, multi touch hardware.

JafaFX radial gradient

一个人想着一个人 提交于 2020-01-16 04:26:05
问题 I would like to reproduce the following screen with JavaFX and tried this (stripped) code: public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception{ primaryStage.setTitle("Hello World"); primaryStage.setFullScreen(true); primaryStage.setFullScreenExitHint(""); AnchorPane root = new AnchorPane(); root.setStyle("-fx-background-color: " + "rgb(15,37,74), " + "radial-gradient(center 50% 50%, radius 65%, rgb(97,156,188) 10%, rgb(22,51,93));"); Scene

Enabling liteMode in Javascript googlemaps api

喜夏-厌秋 提交于 2020-01-16 04:11:07
问题 We are using JavaFX' WebView to embed a webpage where we want to display map content using google map's javascript API and ng-map. NgMap.getMap().then(function (map) { map.setOptions({ maxZoom: 17, streetViewControl: true, // liteMode: true, // that would be cool :-) streetViewControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT }, keyboardShortcuts: false, //... ommited for brevity }); }); As WebView is not supporting WebGL we need to find a way to enable lite mode (as it is