javafx

Use Groovy app and test code in combination with jlink solution for bundling JavaFX

纵饮孤独 提交于 2020-04-17 22:49:36
问题 This follows on from this excellent solution to the question of how to get Gradle to bundle up JavaFX with your distributions. NB specs: Linux Mint 18.3, Java 11, JavaFX 13. That stuff, involving jlink and a module-info.java, is beyond my pay grade (although I'm trying to read up on these things). I want to move to using Groovy in my app and test code (i.e. Spock) rather than Java. The trouble is, the minute I include the "normal" dependency in my build.gradle i.e. implementation 'org

资源:Java

偶尔善良 提交于 2020-04-16 07:15:27
【推荐阅读】微服务还能火多久?>>> ylbtech-资源:Java 1. 返回顶部 2. 返回顶部 · https://docs.oracle.com/javase/8/docs/ · Oracle has two products that implement Java Platform Standard Edition (Java SE) 8: Java SE Development Kit (JDK) 8 and Java SE Runtime Environment (JRE) 8. JDK 8 is a superset of JRE 8, and contains everything that is in JRE 8, plus tools such as the compilers and debuggers necessary for developing applets and applications. JRE 8 provides the libraries, the Java Virtual Machine (JVM), and other components to run applets and applications written in the Java programming language. Note that the JRE

extending CSS style in JAVAFX

╄→гoц情女王★ 提交于 2020-04-16 06:37:01
问题 I' m trying to use CSS in JAVAFX application. Is there a way in the CSS file to make use of some kind of inheritance? For example I have one style called "redline": .redline{ -fx-stroke:red; -fx-stroke-width:5px; } Can I create a second style "greenline": .greenline{ -fx-stroke:green; } in a way that it inherits from "redline". Say, something like: greenline extends redline so that the "green" lines have a strokewidth of 5px? Thanks in advance! 回答1: You need to make a make a more specific

extending CSS style in JAVAFX

天涯浪子 提交于 2020-04-16 06:35:53
问题 I' m trying to use CSS in JAVAFX application. Is there a way in the CSS file to make use of some kind of inheritance? For example I have one style called "redline": .redline{ -fx-stroke:red; -fx-stroke-width:5px; } Can I create a second style "greenline": .greenline{ -fx-stroke:green; } in a way that it inherits from "redline". Say, something like: greenline extends redline so that the "green" lines have a strokewidth of 5px? Thanks in advance! 回答1: You need to make a make a more specific

How can I use randomisation to specify different object parameters to a single iteration in a loop?

女生的网名这么多〃 提交于 2020-04-16 05:45:27
问题 I currently have a simple for-loop with 5 iterations that creates 'brick' game objects, adds them into the 'bricks' array and laying them out across the x axis of my javaFX scene. currently, as you can see on the Gameobj parameters; they are all blue. However, I want to have one of these bricks set as yellow on a random iteration of the loop. Here is my code: public void initialiseGame() { bricks = new ArrayList<>(); for(int i=0; i<5; i++) { GameObj brick = new GameObj(i*100, 100, BRICK_WIDTH

FXML Label text bold

自闭症网瘾萝莉.ら 提交于 2020-04-13 17:33:28
问题 Can someone please tell me how to make the text inside a label bold in Java FXML? <Label fx:id="LegalLabel" text= "Legal Information" GridPane.halignment="RIGHT" GridPane.rowIndex="16" /> Thank you. 回答1: Give this a shot legalLabel.setStyle("-fx-font-weight: bold;"); or try making your fxml look like this <Label fx:id="LegalLabel" text= "Legal Information" GridPane.halignment="RIGHT" GridPane.rowIndex="16"> <font> <Font name="System Bold" size="13.0" /> </font> </Label> Edit: try this:

i have made pencil drawing on group but it is drawing with some gaps leaving behind.how to make it smooth? [closed]

谁都会走 提交于 2020-04-12 08:00:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . I am using adding circle on mouse drag with 5px of radius.It is eaving some gap behind .How to make it smooth. public void onMouseDragged(MouseEvent event) { Circle circleForShape = new Circle(); circleForShape.setCenterX(event.getX()); circleForShape.setCenterY(event.getY()); circleForShape.setRadius(5);

How to deploy a JavaFX project with Maven to an EXE?

落爺英雄遲暮 提交于 2020-04-11 11:45:14
问题 I hope this question does not seem to basic but I could not find any good documentation despite researching for hours. I use Maven (Version 3.3.9) for my JavaFX (Version 11.0.2) with JDK 13.0.1 project and want to build an EXE. What is the easiest way to do this? All my researchs stucked somewhere. Following this documentation, I tried to integrate ant-tasks. But the documentation required ant-javafx.jar to be in the jdk_home/lib directory which doesn't make sense for JDK 13 since it doesn't

How to change ListView cell's text color in JavaFX using css

人走茶凉 提交于 2020-04-11 05:39:42
问题 So I have a list which is full of names from my database. Those names represent employees that work or used to work in the firm. I've seen that is possible to change cell's text color but when I apply it, it changes all of them. What I really want is to change color of the clients that are no more working. I've added "not active" in List so I can separate "active" and "not active" clients. Here is the code where I add employees names in the ArrayList: public ArrayList<String> search(String

WebView in javaFX, not work with Whatsapp web

為{幸葍}努か 提交于 2020-04-10 03:00:50
问题 I need to access the WhatsApp Web from a JavaFX application I'm not getting. When the page opens I get a message to use another browser. I have tried to change the UserAgent but it does not work. Code: WebEngine eng = webView.getEngine(); eng.load("https://web.whatsapp.com/"); eng.setJavaScriptEnabled(true); eng.setUserAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"); How can I solve this? 回答1: I was unable to