javafx

configure a custom variant in HijrahChronology for date correction jdk 8

拥有回忆 提交于 2020-01-02 09:58:27
问题 I have used DatePicker in javafx - JDK 8 and used HijrahChronology.INSTANCE - so that the date picker shows both the calendar - everything work good enough but I am having a difference of 1 day between gregorian calendar and hijri calendar. Hijri Calendar is 1 day backward. I am trying to change the variant as per the following link https://bugs.openjdk.java.net/browse/JDK-8187987 but unable to succeed in it. Kindly explain or refer a better or a clear solution to this issue. Code:

WizardPane : Disable 'Previous' button on a screen

被刻印的时光 ゝ 提交于 2020-01-02 09:58:26
问题 How can I disable the 'Previous' button on my Screen of the ControlsFX WizardPane ? I am trying it with this method prev.setDisable(true) but what I have is NullPointerException . public class MainApp extends Application { Wizard wizard = new Wizard(); WizardPane1 page1 = new WizardPane1(); WizardPane page2 = new WizardPane(); WizardPane page3 = new WizardPane() { @Override public void onEnteringPage(Wizard wizard) { Node prev = lookupButton(ButtonType.PREVIOUS); prev.setDisable(true); } };

Scroll TableView via a Button

北战南征 提交于 2020-01-02 09:28:30
问题 Background Using JavaFX, I render a TableView and a Button side by side. The Table contains a number of entries which are more then the Table size. Hence TableView automatically shows a scrollbar for scrolling down. The Problem I want to scroll down the table by using the button. So pressing the button, scroll down the table by 5 entries. I found the scrollTo() method, which would be sufficient for the task, but I need an index to scroll to. Which I do not have, as far as I understand there

Is it possible to retrieve HTML element in web engine without using Javascript?

余生长醉 提交于 2020-01-02 08:10:09
问题 Is there a way to identify the type of the clicked element in webView (like Textbox/Radio/Button etc) using the webEngine.getDocument() ? Suppose I click on a textfield, I can get the x,y coordinates of the clicked position. Is it possible to identify the element present in that particular location? Something like the document.elementFromPoint() method in Javascript. I can do it using Jquery/Javascript. But since we have access to Document object and its elements, is there a way to identify

Custom object drag-and-drop from embedded FX (JFXPanel) to Swing

情到浓时终转凉″ 提交于 2020-01-02 06:56:40
问题 This question is a follow-up question to Custom object drag-and-drop from FX to Swing. I'm working on a plugin for a Swing application that uses JavaFX for some graphical user interfaces. We added drag-and-drop functionality to improve the user experience. First, we were using an external JavaFX window ( Stage ) for our Scene , now we want to embed it directly into the Swing application via a JFXPanel . Now, the strange thing is, that it seems to make a big difference for drag-and-drop

Form validator message

拜拜、爱过 提交于 2020-01-02 06:56:21
问题 I'm looking for form validator similar to these examples: or Is this custom JavaFX component or this can be done using standard JavaFX? Is there any example how I can create form validator similar to these? 回答1: Just to give you a kick start, here is a small example with using ContextMenu. May be ContextMenu is not an ideal Control for this scenario and you are free to replace it with Label, Text etc. Keep the TextField and Label inside a HBox (with Label being hidden initially) and the HBox

How to set 'headless' property in a Spring Boot test?

▼魔方 西西 提交于 2020-01-02 06:56:10
问题 I am testing using Spring Boot with JavaFX (Based on some excellent YouTube videos that explain this). To make it work with TestFX, I need to create the context like this: @Override public void init() throws Exception { SpringApplicationBuilder builder = new SpringApplicationBuilder(MyJavaFXApplication.class); builder.headless(false); // Needed for TestFX context = builder.run(getParameters().getRaw().stream().toArray(String[]::new)); FXMLLoader loader = new FXMLLoader(getClass().getResource(

JavaFx css for whole application

前提是你 提交于 2020-01-02 06:33:47
问题 we are struggling on a problem with custom css for our application. Until now we used workaround to apply our custom css but keep modena style for the rest. StyleManager.getInstance().addUserAgentStylesheet(css); In 8u40 java update this behavior was however restricted and is no longer working. Setting stylesheets to all scenes separately is madness, setting custom stylesheet via Application.setUserAgentStylesheet(css); works but not as we intended - modena stylesheet is replaced by custom so

JavaFx css for whole application

孤人 提交于 2020-01-02 06:33:08
问题 we are struggling on a problem with custom css for our application. Until now we used workaround to apply our custom css but keep modena style for the rest. StyleManager.getInstance().addUserAgentStylesheet(css); In 8u40 java update this behavior was however restricted and is no longer working. Setting stylesheets to all scenes separately is madness, setting custom stylesheet via Application.setUserAgentStylesheet(css); works but not as we intended - modena stylesheet is replaced by custom so

JavaFX Full Screen Exclusive Mode

被刻印的时光 ゝ 提交于 2020-01-02 05:46:07
问题 I am making a JavaFX kiosk application that needs to take full control of the screen and disallow closing, minimising, and certain keypresses. I was wondering is there a way to make a JavaFX application run in full screen exclusive mode, if not are there any alternatives that could achieve the same goal. I have tried using: stage.setFullScreen(true); which does successfully make the application full screen, however the user can still exit the application or exit the full screen. 回答1: Handle