javafx

How Can I embed java3d's Canvas3d in javafx layout?

亡梦爱人 提交于 2020-01-17 03:17:13
问题 I try to embed Canvas3d in StackPane using SwingNode . I put Canvas3d into JPanel , and put JPanel into SwingNode . But only empty Jpanel was appeared. I heard in somewhere that SwingNode is rendering only pure Swing. So I used JCanvas3d instead of Canvas3d , but it is not working too! Is there any method to embed Java3d's Canvas3d in javafx layout? It's okay if not use SwingNode. My java version is jdk 1.8_xx And Here is my source code public class Main extends Application { public static

Combine Images for overlay

柔情痞子 提交于 2020-01-17 02:52:12
问题 I try to do something similar to this post: related question Now I try to combine several stencils. The combined stencil looks as expected, however the inverted group is either black or white, depending on the order of the group created. The result I get: It seems that the grouping still takes some Blend-information of the childs, or maybe I just don't get the idea of the blends. Any Idea how I can achieve an overlay as in the old question but with several stencils? Here are the images:

How can I change the points colors of a ScatterChart using javafx inside java code?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-17 02:39:13
问题 Such as I can to do Set<Node> nodes = lineChart.lookupAll(".series" + index); for (Node n : nodes) { n.setStyle("...css style code..."); } for LineChart, how can I do the same for ScatterChart? 回答1: Here is an MCVE of node/color change. Code from here. import java.util.Set; import javafx.application.Application; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.ScatterChart; import javafx.scene.chart.XYChart; import javafx

Pure JavaFX: convert Image to bytes Array (+ opposit operation). What's wrong?

点点圈 提交于 2020-01-17 01:22:09
问题 The user can browse to an image file. I want to persist the selected file to a db (derby db), in BLOB Column. to do that, I need to convert Image object to an array of bytes (byte[]), and to retreive it I need to: byte[] -> Image. So I search and found this: from this question pure java fx solution trace ( == you will have to fill in missing points :) Image i = logo.getImage(); PixelReader pr = i.getPixelReader(); PixelFormat f = pr.getPixelFormat(); WriteablePixelFromat wf = f

Intellij IDEA JavaFX Scene Builder different resolution to the rest of the application

人走茶凉 提交于 2020-01-16 19:52:11
问题 I have this issue with the JavaFX Scene Builder. It works as intended but the resolution seems to be lower than the rest of the application. Intellij IDEA did update recently to the 2018 version and thats when the issue started. I have tried downgrading to the previous version but the issue is still there. Is there a way that I can revert the settings for Scene Builder or is there a setting that I have missed? Can't find anything about it online. TIA 回答1: It's a known issue. Current

JavaFx Pane Button position

狂风中的少年 提交于 2020-01-16 19:32:52
问题 As a layout I have a Pane . How do I set the position of a button always in the right corner when windows size is changed? Pane root = new Pane(); Button b = new Button("Button "); b.setLayoutX(100); b.setLayoutY(0); root.getChildren().add(b); 回答1: Pane is not a good fit for this kind of layout. You could use StackPane : This will align every single child to a corner, center of an edge or the center though. AnchorPane : By default this layout works the same as Pane , but if you set anchors,

JavaFx Pane Button position

倾然丶 夕夏残阳落幕 提交于 2020-01-16 19:32:40
问题 As a layout I have a Pane . How do I set the position of a button always in the right corner when windows size is changed? Pane root = new Pane(); Button b = new Button("Button "); b.setLayoutX(100); b.setLayoutY(0); root.getChildren().add(b); 回答1: Pane is not a good fit for this kind of layout. You could use StackPane : This will align every single child to a corner, center of an edge or the center though. AnchorPane : By default this layout works the same as Pane , but if you set anchors,

How can you reload or refresh a scene with javafx 1.3

会有一股神秘感。 提交于 2020-01-16 19:05:12
问题 i'm making a "memorie" game with javafx 1.3. (I'm not really good in English but i will try it.) The main question is, how can I reload a scene after a scene change. And with reload I mean the code will be done again. Because I've four scenes, and all the scenes stay on false but the scene I show stays on true. But one of the scenes have to reload again to make the game right. So The game has 16 rectangles wich are closet, underneath them there are 8 different pictures from every are twice.

How can you reload or refresh a scene with javafx 1.3

我的梦境 提交于 2020-01-16 19:04:06
问题 i'm making a "memorie" game with javafx 1.3. (I'm not really good in English but i will try it.) The main question is, how can I reload a scene after a scene change. And with reload I mean the code will be done again. Because I've four scenes, and all the scenes stay on false but the scene I show stays on true. But one of the scenes have to reload again to make the game right. So The game has 16 rectangles wich are closet, underneath them there are 8 different pictures from every are twice.

How can you reload or refresh a scene with javafx 1.3

旧城冷巷雨未停 提交于 2020-01-16 19:03:29
问题 i'm making a "memorie" game with javafx 1.3. (I'm not really good in English but i will try it.) The main question is, how can I reload a scene after a scene change. And with reload I mean the code will be done again. Because I've four scenes, and all the scenes stay on false but the scene I show stays on true. But one of the scenes have to reload again to make the game right. So The game has 16 rectangles wich are closet, underneath them there are 8 different pictures from every are twice.