javafx-8

Create a cube using different textures in JavaFX

 ̄綄美尐妖づ 提交于 2019-12-13 06:17:45
问题 How can I create a cube that uses different images for each side? I would like to choose the images to use dynamically, using the user's input. The obvious solution would be to create six separate rectangles (wouldn't this be worse performance-wise?), but is there a way that utilizes the existing Box functionality (e.g. something similar to TextureCubeMap in Java3D)? So far all I've found are solutions using one image as a texture for the entire cube (example: this.) 回答1: I ended up writing a

JavaFX 8 Image load (Invalid URL or resource not found)

我怕爱的太早我们不能终老 提交于 2019-12-13 05:49:42
问题 as said there docs.oracle about Image class: // load an image in background, displaying a placeholder while it's loading // (assuming there's an ImageView node somewhere displaying this image) // The image is located in default package of the classpath Image image1 = new Image("/flower.png", true); I shared my simple project at github, so you can easily access code. and this is piece of my code: splashScreen = new Image("/gravixsplash.png"); splashScreenBackplate = new ImageView();

how can i use Gstreamer in javafx videoplayer?

泪湿孤枕 提交于 2019-12-13 05:26:05
问题 this is a videoplayer in javafx.how we can support mkv,vob,avi etc extension ? is this possible to use gstreamer in javafx to support other extension? how can we use gstreamer or if not then plz say any other way to make the videoplayer other extension supported... import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Slider; import javafx.scene.layout.VBox; import javafx.scene.media.Media; import javafx.scene.media

Changing JavaFX label using Javascript callback method

可紊 提交于 2019-12-13 05:25:43
问题 This question might be considered as a simple extension to this qeustionI have a simple application with a label and a WebView. The WebView contains a small rectangle whose onclick should invoke a method in JavaFX and change the text of a label. Following is my FXML file <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.web.*?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <AnchorPane id=

Add fixed positioned Combobox inside FlowPane

馋奶兔 提交于 2019-12-13 05:23:25
问题 I have a FlowPane which will hold many panels which are based on BorderPane . I want to create ComboBox which will be used to filter the Panels by type. And the panels will be scrolled by ScrollPane when they exceed the visible area. I want the combo box to scroll along with the FlowPane inside the ScrollPane. I want to get the result which is displayed into the picture. Can you tell me how I can get the desired result. I can very easy create BorderPanes and insert them into the FlowPane and

How to maintain GridPane's fixed-size after adding elemnts dynamically

你离开我真会死。 提交于 2019-12-13 05:19:28
问题 I need to create board game that can be dynamically change. Its size can be 5x5, 6x6, 7x7 or 8x8. I am jusing JavaFX with NetBeans and Scene builder for the GUI. When the user choose board size greater than 5x5 this is what happens: This is the template on the scene builder before adding cells dynamically: To every cell in the GridPane I am adding StackPane + label of the cell number: @FXML GridPane boardGame; public void CreateBoard() { int boardSize = m_Engine.GetBoard().GetBoardSize(); int

javafx tableview get selected data from ObservableList

徘徊边缘 提交于 2019-12-13 04:16:04
问题 i am working on a javafx project and i need your help . while i am trying to get selected data from table i can get selected data from normal cell but can't get data from ObservableList inside tableview. code for my database: -- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 10, 2014 at 06:20 AM -- Server version: 5.1.33-community -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101

JavaFx: ComboBox textWrap

二次信任 提交于 2019-12-13 04:15:59
问题 I am trying to wrap the text in the ComboBox but I cannot really manage it. I need the wrapped text in the editor part, not in the dropdown part of the comboBox . I see that the editor is a TextField , and its text cannot really be wrapped or? Is there any trick or solution to have a nicely wrapped text so if I have a really long text I can see it every time? So instead of displaying the ... I want the whole text to be displayed. Code part I don't know if I should add since it is really

Controls FX Progress Dialog Modality & Alert Modality

大憨熊 提交于 2019-12-13 03:55:03
问题 I have run into a little bit of an issue that I am not real sure on what to do. My application will have a general application stage which will present the users with their options for work - i.e. a task list, or something like that. When the users selects one of these options, I am to navigate to window to perform the work. They would like to have the general stage open always and open a another stage for the work to be done. I can do that with: FXMLLoader loader = new FXMLLoader(); Parent

How to reinit the NumberAxis and move to next value in JavaFX LineChart?

孤人 提交于 2019-12-13 03:47:54
问题 I am currently trying to create a chart, which allows me to restart the x-axis and continue drawing. The axis range is 0-100, but when the graph reaches 100 need the following values is again 0. But what makes the chart is to be returned to the initial zero. in the next two picture I show how to work the chart currently. what makes the chart is to be returned to the initial zero and continue. I need something like this: Thank you very much for your help!! 回答1: You can utilize the axis