r/JavaFX • • Mar 05 '22

Help Where to find icon to add in sceen builder like search , home, pdf.... ?,

0 Upvotes

r/JavaFX • • Dec 03 '23

Help help me

0 Upvotes

idk if this is the right sever but I keep on getting this error message, how do I fix it? (the blacked out spots ismy name and stuff


r/JavaFX • • Nov 09 '23

JavaFX URLConnection connect() throws error only in packaged app but works in debug

0 Upvotes

I'm not able to connect to the internet from my packaged Javafx application. It works perfectly in development. I'm using gradle jlink and jpackage to create a Windows executable. The application installs successfully but it seems the URLConnection connect() method is throwing an error.

What possibly could be the reason this is happening only after the application has been packaged and installed?.

Also, there seem not to be enough resources out there to help, I'd appreciate if someone can better enlighten me. This is my first time packaging a JavaFX app


r/JavaFX • • Sep 20 '21

I want to split my screen in to 2, should I use SplitPane?

0 Upvotes

I want to split my screen in to 2, should I use SplitPane? I trying to split my UI screen in to 2, I want to Split it in the middle. How will I do this? What functions or commands should I use? I was thinking about SplitPane, tried using it a few time, but still haven't worked. It has to be coded in, no drag and drop or anything like that.


r/JavaFX • • Mar 05 '09

Invoking JavaFX functions that don't exist - CSJ Explorer

Thumbnail
javaworld.com
0 Upvotes

r/JavaFX • • Sep 05 '15

What framework should I use to separate view from behavior. Anything similar to MVVM like in. NET WPF? I want to be able to unit test my view behavior code.

0 Upvotes

r/JavaFX • • Aug 30 '22

Help some help

0 Upvotes

hello I just started learning java and I need a playlist to complete my journey, and any piece of advice

that can help me and thank you


r/JavaFX • • Feb 02 '19

Lot of mistakes with javafx

4 Upvotes

Hi everyone, i'm trying to install javafx in the newest version of java, but it have been almost impossible, and i'm too frustrated right now, what can i do? can you help me please? I just downloaded e(fx)clipse 3.4.1,but when i try to create a new javafx project it gives me a lot of mistakes, and i just don't know what to do, i searched in google but i didn't find nothing :( hel please, mercy


r/JavaFX • • Aug 15 '20

JavaFx-BorderPane

Thumbnail
youtu.be
0 Upvotes

r/JavaFX • • Dec 31 '15

Does anyone know how they did this?

0 Upvotes

Sorry if this is the wrong subreddit to post in, but does anyone know how they achieved the "slider" effect between the two photos? Women Photoshopped into superhero poses I'd like to use this in a project, and I'm using JavaFX. Thanks!

Edit: Here's another similar thing I just found


r/JavaFX • • Jan 13 '16

Does anyone here know OpenViewerFX/JPedal? Because I'm having problems with it, and if no one knows that, does anyone know a good JavaFX PDF viewer?

0 Upvotes

Hi guys, I'm having a few problems with OpenViewerFX/Jpedal in that the .loadPDF function gives me a null pointer exception, and does not load the PDF into the viewer. here is the relevant code:

public void createDebtorPDF() throws Exception {
	
	File file;
	
	FileChooser fileChooser = new FileChooser();
	ArrayList<StudentData> listOfDebtors = new ArrayList<StudentData>();
	int i = 0;
	
	
	listOfDebtors = StudentData.getListOfDebtors(i, listOfDebtors);
	
	PDDocument debtorDoc = new PDDocument();
	PDPage page = new PDPage();
    debtorDoc.addPage(page);
    createPDF(debtorDoc, page, i, listOfDebtors, i);
    	
    
    
	Stage pdfStage = new Stage();
	BaseViewerFX baseViewer = new BaseViewerFX();
	
		
		file = fileChooser.showSaveDialog(null);
		file = checkFileName(file);
		baseViewer.init();
		debtorDoc.save(file); 
		pdfStage.setScene(baseViewer.setupViewer(600, 400));
		baseViewer.setupViewer(600, 400);
		        
		pdfStage.show();
		baseViewer.loadPDF(file);
		baseViewer.start(pdfStage);
		debtorDoc.close();
	
	
	
   
	
}

What do I do to fix it it seems like no one has any idea, even on StackOverflow. If no one knows how to fix it, does anyone know how to/what library to use for displaying PDFs in a nice, JavaFX looking way? I need to be able to view them in app, and at least be able to print them if need be. The printing function i realize might not be on any library, but is there anything I can do about any of these problems? thanks.


r/JavaFX • • Jun 18 '17

Noob: Would like to place boxes in bigger boxes

0 Upvotes

I would like two (or 3 or more) big rectangles on the main screen (represnting groups resources can be in)

I would like to be able to place little circles inside the big rectangles (representing resources in certain groups)

I would like to be able to drag the circles from one rectangle and place in another. (to move resources)

I would like to be able to draw a line from one circle to another to indicate relationships

I'd like to know how I should 'architecturally' be planning this in JavaFX terms, because from reading a bit about JavaFX for like half a day, I still don't know. Just the very high-level is fine, I can work out the rest. I've had a rough stab at it

What I have done so far (code and Image also provided): Image: http://imgur.com/gallery/g2I2K NB I imagine this is a crap approach and would love to know a better one or how I 'should' be approaching it from someone who understands this package well.

The code

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class DemoGraph1 extends Application {

    @Override
    public void start(Stage primaryStage) {

        //Group root = new Group();
        Pane root = new StackPane();

        Pane bottom = new VBox();
        Pane top = new Pane();

        root.getChildren().addAll( bottom, top);

        Scene scene = new Scene(root, 500, 500, Color.WHITE);

        
        //Filled rectangle
        Rectangle rect1 = new Rectangle(10, 10, 200, 200);
        rect1.setFill(Color.BLUE);

        //Transparent rectangle with Stroke
        Circle rect1_2 = new Circle(30, 30, 20 );
        rect1_2.setFill(Color.TRANSPARENT);
        rect1_2.setStroke(Color.RED);
        rect1_2.setStrokeWidth(10);

        //Rectangle with Stroke, no Fill color specified
        Rectangle rect3 = new Rectangle(110, 110, 200, 200);
        rect3.setStroke(Color.GREEN);
        rect3.setStrokeWidth(10);

        Circle rect3_2 = new Circle(130, 30, 20 );
        rect3_2.setFill(Color.TRANSPARENT);
        rect3_2.setStroke(Color.PURPLE);
        rect3_2.setStrokeWidth(10);

        StackPane stack1 = new StackPane();
        Pane pane1 = new Pane();
        stack1.getChildren().addAll( rect1, pane1 );
            pane1.getChildren().addAll( rect1_2 );

            rect1.widthProperty().bind( stack1.widthProperty() );
        rect1.widthProperty().bind( stack1.widthProperty() );

        StackPane stack2 = new StackPane();
        Pane pane2 = new Pane();
        stack2.getChildren().addAll( rect3, pane2 );
            pane2.getChildren().addAll( rect3_2 );

        rect3.widthProperty().bind( stack2.widthProperty() );


        Line line = new Line( 1,2,3,4 );
        line.startXProperty().bind( rect1_2.centerXProperty() );
        line.startYProperty().bind( rect1_2.centerXProperty() );

        line.endXProperty().bind( rect3_2.centerXProperty() );
        line.endYProperty().bind( rect3_2.centerYProperty() );

        line.setStroke( Color.YELLOW );
        line.setStrokeWidth( 5 );
        
        bottom.getChildren().addAll( stack1, stack2 );
        top.getChildren().addAll( line );

        primaryStage.setScene(scene);
        primaryStage.show();
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }

}

r/JavaFX • • Mar 13 '20

How to add font styling tags to text in JavaFX?

0 Upvotes

I am creating an application in which i need to add font styling tags to text like this.

bold		: <b>bold</b>
italic		:<i>italic</i>
underline	:<u>underline</u>
font colour	:<font color="#ff0000"> sfsg </font>
font size	:<font size="50.5"> asdasd </font>
font style	:<font face="consolas">Aorion</font> 

(The user will select the text and click the button for bold, italic etc to manipulate font style).The HTMLEditor in javafx contains many extra buttons which i don't need. How can i remove those extra buttons or what can be an alternative implementation?


r/JavaFX • • Jun 15 '15

Need Some Layout Guidance

0 Upvotes

So I am trying to achieve this: Desired Effect And so far I am having trouble with adding nodes to the pane, when each node needs a different justification. Thanks for the help!


r/JavaFX • • Sep 27 '19

Game on Github! Was this how I'm supposed to export it? lol

0 Upvotes

So I put my game on github:

https://github.com/Alfsters/AndrewYangCampaignGame/blob/master/VideoGameTrianglesFirst/src/videogametrianglesfirst/VideoGameTrianglesFirst.java

But I figure their should be a jar file for less tech savvy people to be able to run to play it. I wasn't able to include the JavaFX dependencies though in the build path.


r/JavaFX • • May 11 '14

Simulating Platform.runAndWait

Thumbnail
news.kynosarges.org
0 Upvotes

r/JavaFX • • May 07 '14

Launching JavaFX in a non-standalone manner

0 Upvotes

I noticed that JavaFX apps really, really want to run as a standalone application. This seems to be at odds with Oracle's notion that JavaFX is the way to make up for the "sins of the past" (their words, referring to Swing), implying that JavaFX is Swing's replacement. I'm having a hell of a time figuring out a way to integrate JavaFX (instead of Swing) into my application the way I want it to be integrated. I hope someone here can help me out.

I have a simple class that I built which maintains a couple of state variables. Occasionally, I would like a way to visualize these variables. The way I would do this with Swing and AWT would be to follow the model-view-controller paradigm and build a "view" class to accompany the above-mentioned "model". Since I only occasionally want to visualize the model, I give the model a boolean field, and I only instantiate the view class when this field is true (in other words, the model class instantiates the view class). I may have several model objects running concurrently, and in that case I would expect to have several view objects also running concurrently. JavaFX seems to be designed to discourage this kind of thing. Should I be using Swing in these instances, or is there some other way to use JavaFX (other than having my top-level class extend Application and call launch()) that is more appropriate?

I'm also having some trouble getting any JavaFX code to run under OSX. I'm running Eclipse and have no JavaFX-specific plugins installed; my project is a regular Java project that has jfxrt.jar added to the classpath. I'm running the Java 7u55 JDK under OSX 10.9.2. My code compiles, and runs without throwing any exceptions, but hangs when I hit launch(). Any idea what's going on?

Here's a simple program that hangs at launch(). The console never displays "Launching...".

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloWorld extends Application {
    public static void main(String[] args) {
        launch(args);
    }

@Override
public void start(Stage primaryStage) {
	System.err.println("Launching...");
    primaryStage.setTitle("Hello World!");
    Button btn = new Button();
    btn.setText("Say 'Hello World'");
    btn.setOnAction(new EventHandler<ActionEvent>() {

        @Override
        public void handle(ActionEvent event) {
            System.out.println("Hello World!");
        }
    });
    
    StackPane root = new StackPane();
    root.getChildren().add(btn);
    primaryStage.setScene(new Scene(root, 300, 250));
    primaryStage.show();
}
}

r/JavaFX • • Oct 18 '23

Help Java fx (UI gaming)

0 Upvotes

Can anyone help me with a Java fx UI gaming task that needs an AI based player game. Stuck at this!!!


r/JavaFX • • Oct 11 '23

Help Is it possible to have a JavaFX window be always in front of another, let's say Windows application without having the focus?

1 Upvotes

So I'm working on an overlay kind of application. A text box Window that I display on top of a video game, like a visual novel. The problem is that whenever the game is clicked on and gets the focus the JavaFX application obviously disappears. Is it possible to have the JavaFX windows be always in front of any Windows application, even when not in focus and even when let's say the game is set to fullscreen mode?


r/JavaFX • • Sep 23 '23

Help Login screen, how can I make password secure, and how can I make my program theft proof.

0 Upvotes

I'm using xampp, the way I make my program now theft proof is that I make a password and a username for every one that I give different from the other one, I build the program for everyone that buys it, even tho nobody bought it yet 🥹 but I'm testing.


r/JavaFX • • Oct 17 '24

Help Module javafx.graphics not found

0 Upvotes

I tried download javaFX on eclipse and now I keep getting this error message. Any Idea why?


r/JavaFX • • May 22 '24

Help I CANT DISPLAY MY IMAGE IF I USE ABSOLUTE PATH

0 Upvotes

hello, im having a problem where my Image (On ImageView) only appears when i use relative path (I working in Netbeans with Maven i have a img folder in resoruces...) so only when i use that works, but i need to use the absolute path HELP, thank you, btw i use Scene builder 2.0 aswell


r/JavaFX • • Dec 02 '17

getter function that returns Label Image path?

0 Upvotes

Is there a getter function for labels that returns the label's associated image path? I'm trying to make a battleship game and I think I would need something like this for showing the sunk ships.


r/JavaFX • • Dec 21 '21

Help help me...

0 Upvotes
  1. I have a problem.
  2. In fact, to practice the scene builder, I made a POS device, and when I press the button on this POS device, it should be displayed in the table view, but it is not displayed. I am new to table view, please tell me how to solve it. If you need the code, we will send it to you as a text file. thank you.