Questions tagged [javafx]
The JavaFX platform enables developers to create and deploy rich desktop or browser-embedded applications that behave consistently across multiple platforms and browsers.
160 questions
0
votes
0
answers
28
views
PathFinding.java: controller in MVC
Intro
This time, I need to get reviewed the controller class (from MVC pattern) responsible for user interaction with the 2D grid graph.
Code
...
0
votes
0
answers
24
views
PathFinding.java: SettingsPane class
Intro
I am still working on PathFinding.java. This time I need to get reviewed the class responsible for choosing the heuristic function, the finder implementation, just to mention a few of settings ...
0
votes
0
answers
38
views
CodeView Custom JavaFX Node
I created this to learn about creating custom controls using Region. I did not do any testing of the Control, and it is limited to displaying Java only. I didn't need this for any reason other than ...
5
votes
1
answer
329
views
PathFinding.java: The grid view and model
Motivation
I am really fond of qiao/PathFinding.js, and, so, I decided to start to do something similar (PathFinding.java). Also, this time, I am wishing to practice some MVC-patterns. It would seem ...
4
votes
2
answers
302
views
Alternate two messages on mouse click using Java-FX
Write a program to display the text Welcome to Java and LearningJavaFX alternately with a mouse click.
...
6
votes
2
answers
330
views
Visualize Python data in JavaFX with Py4J
For a larger project, I need to build a bridge between a Python and a Java programme. I decided to use Py4J and constructed a smaller problem to familiarise myself with the first steps.
Java is ...
5
votes
1
answer
246
views
Implementing Dependency Injection into a JavaFX CRUD Application
As a learning exercise and potential portfolio piece, I decided to create a Java/JavaFX application with MySQL integration.
I used dependency injection because it seemed like the cleanest way to pass ...
7
votes
3
answers
506
views
First Java Program: A Basic GUI Library Management System with JavaFX
Requirements:
Add/Delete member.
Add/Delete book.
Issue/Return book.
Review Request:
General coding comments, bad practices, style et cetera.
Code:
Main.java:
<...
9
votes
2
answers
973
views
JavaFX app with User Authentication and SQL Persistence
This JavaFX program is just supposed to allow a user to register a username and password and then have it stored in an SQL database.
There's been some criticism that it's not clean, readable or ...
2
votes
1
answer
91
views
JavaFx Music Player
I built a small program that searches and plays wav files on your PC.
This Java Music Player application is my first comprehensive project. It features a straightforward graphical user interface (GUI) ...
5
votes
1
answer
124
views
ConnectFourFX.java - A Java FX GUI app for playing Connect Four against AI
GitHub
The entire project relies here (ConnectFourFX.java) and is dependent on Connect4.java.
Code
com.github.coderodde.game.connect4.ConnectFourBoard.java:
...
2
votes
2
answers
129
views
Add category section and save in database in admin section with java and javafx using mvc
As I newbie in (java and MVC), I want to know if I understand MVC using java.
My concern is that some of the calls of the class are in the wrong place or, for example, I should have used the interface ...
3
votes
1
answer
107
views
A JavaFX canvas - based UI view component for representing data points in three dimensions
I have this pie chart. It encodes data points in three dimensions, which are encoded via
sector radius,
sector angle,
color intensity of the sector.
How it looks like?
(See here.)
Code
...
3
votes
1
answer
154
views
"2048" game in JavaFX
I wrote my first code in Java and I need constructive criticism and code review.
This is an implementation of the well-known "2048" sliding-blocks game.
...
3
votes
1
answer
84
views
Finance Manager with Embedded Database
I made an CRUD application in Java with JavaFX, H2 Embedded Database and Maven. Can you review my code quickly? Is it well written? What should I improve on it? I don't know if my code is written ...
1
vote
0
answers
67
views
A JavaFX program to find out the mouse refresh rate v3
(This post is the continuation of A JavaFX program to find out the mouse refresh rate v2.)
After taking @J_H's suggestions into account, I ended up here:
...
3
votes
1
answer
83
views
A JavaFX program to find out the mouse refresh rate v2
(See the continuation of this post in A JavaFX program to find out the mouse refresh rate v3.)
(This post is a continuation of A JavaFX program to find out the mouse refresh rate.)
After adopting the ...
2
votes
1
answer
106
views
A JavaFX program to find out the mouse refresh rate
(See the next version here.)
Intro
I have this tiny JavaFX program that shows a 800x600 pixel canvas. You are supposed to drag the mouse within the canvas. When you are done dragging, the program will ...
0
votes
1
answer
127
views
Comparing video recording algorithms in Java: no-compression vs. naive diff compressor
Usage of the program is in Facebook.
Intro
In this JavaFX program, a user is presented with a white canvas with a black circle at the center of the canvas. Then, the user has 10 seconds to record a ...
3
votes
0
answers
363
views
JavaFX dialog for numeric typed data input
I have this small subclass of JavaFX's javafx.scene.control.Dialog that requires the enum specifying the data type of the input data:
...
3
votes
1
answer
192
views
JavaFX CRUD app for rescue animals
I'm fairly new to Java, and I've been working on the following program. It's a basic CRUD app utilizing JavaFX and MVC design pattern. I'm seeking advice because the class I took on Java only covered ...
4
votes
1
answer
149
views
Funny TextUIWindow.java and a simple colorful text editor
(See this repository for full code.)
Now I have rolled a simple class extending JavaFX Canvas for showing terminal like, colorful console:
TextUIWindow.java:
...
3
votes
0
answers
232
views
Simple Java IoC container for dependency injection
I have come up with a quick and simple IoC container to enable minimal dependency injection support in one of my Java projects.
The container supports services with:
A transient lifetime, meaning, a ...
5
votes
2
answers
155
views
Class for serializing themes for my JavaFX application
I have a Theme class for storing themes for my javaFX application. I created a serialize method that stores its information as a String and a constructor to create a Theme from a serialized Theme. I ...
6
votes
1
answer
517
views
Snake Game Clone in JavaFX
I am a beginner at programming. I made this snake game in JavaFX to practice and improve my coding skills. I tried to make my code clean, but I'm not sure if it is, or if it is well-organized. I also ...
5
votes
1
answer
722
views
Space Invaders clone for a college project
Edit: the project was submitted, and I got a good grade! :D
I am finishing up a project for my computer science class. The project is a space invaders clone that uses the JavaFX library to provide ...
3
votes
1
answer
299
views
Obtaining intermediate results from a continuously running background thread in Java/JavaFX
This is a question about Java/JavaFX concurrency. Specifically, how can the UI request intermediate data from a thread running in an infinite loop.
I have a simulation program in Java and JavaFX. The ...
2
votes
0
answers
69
views
Designing a phonebook menu bar, filter and sorting order buttons included
I designed a phonebook application using JavaFX (trying to follow Material Design by Google, as you can see in the screenshot).
The code below is the code that handles the ...
0
votes
0
answers
53
views
Reduce repetition of code for drawing on a canvas in JavaFx
Is there a way to simplify my code underneath? Basically I'm drawing a series of rectangles against each other on a mouse dragged event. The negative numbers are read from a 2D array in an other class ...
3
votes
0
answers
1k
views
Pomodoro JavaFX (MVC Pattern) Countdown Timer
I made a simple JavaFX app. It is just a Pomodoro timer, it works as expected.
The Pomodoro study pattern is a technique where you study for 25 minutes and take a 5-minute break and after 4 periods of ...
4
votes
2
answers
2k
views
Create an analogue clock interface in Java using JavaFX
The app when works fine, but people are saying that the code is not written with good code style and following OOP principles.
Can I improve on any parts of my code? Especially regarding:
Code ...
2
votes
0
answers
676
views
Feedback JavaFX code - MineSweeper using SceneBuilder
I've learned JavaFX recently (with Scene Builder) and made a MineSweeper game, would love to receive feedback and tips for improvement!
Thanks.
Below is mines class, I've commented out some lines for ...
6
votes
1
answer
2k
views
JavaFX clone of Snake game
I have made a Snake clone using Java 14 and JavaFX 14. My game uses an anonymous instance of the AnimationTimer class as the game loop. The basic UI for the start ...
3
votes
1
answer
117
views
Concerned about thread safety
I'm writing start/stop module for my application.
I have a class that manages application life cycle and I called it Work.
Work ...
5
votes
3
answers
3k
views
Ensuring threads running infinite loops are terminated before exiting the program
As a hobbyist programmer, I gain knowledge where I can find it from google searches. I tend to write code that utilizes threads that have infinite loops using while loops, where the while condition ...
3
votes
1
answer
5k
views
Multiple buttons and their event handlers in JavaFX
In my project I used this code to create a GUI using JavaFX. The aim was to have a screen with 7 buttons on it. Next, depending on which button is pressed another set of buttons will appear on the ...
8
votes
1
answer
678
views
Gem Puzzle game
I started learning JavaFX a few days ago and I have just created as an exercise a simple Gem Puzzle game. The puzzle pieces can be moved if we click on them. The visual aspect of the game is very ...
3
votes
0
answers
494
views
Making a fast Mandelbrot Fractal viewer
I'm making a Mandelbrot set viewer in JavaFX. It takes a while, like maybe 5 seconds to finish. Here's my code:
...
2
votes
0
answers
56
views
1
vote
1
answer
1k
views
Animation of adding / removing nodes from VBox
Method hide_old_show_new (I can't think of a suitable name) gradually, using FadeTransition, removes all nodes (from last to ...
2
votes
0
answers
2k
views
JavaFX lazy loading of images in TableView
This code is based off https://stackoverflow.com/questions/25711103/javafx-combobox-lazy-loading-images but modified to work with a TableCell
Firstly, the model object should have an observable ...
7
votes
1
answer
2k
views
JavaFX Connect Four AI
I made a Connect Four AI with minimax algorithm. It's my first bigger JavaFX project. Any help for improvements would be really appreciated.
Board:
...
1
vote
1
answer
181
views
slow JavaFx PostgreSQL CRUD app with complex object
I've created a JavaFX app to the data about Vessels, Employees and Jobs. The current version works but it is quite slow which I need to fix. I understand the root of my problems but I do not know how ...
1
vote
1
answer
538
views
Multithreading to allow multiple clients on to a server and client requests handling
I have to create a client-server JavaFX application using MVC which does many operations consisting mainly in messages exchange.
I'd like to know if this way to handle client acceptance and client ...
5
votes
1
answer
1k
views
Snake Game in Java feedback
I started coding in August 2018, and I was wondering on how I can improve as a programmer. I'm more concerned about coding conventions. Particularly, how can I improve the structure of my code, ...
1
vote
1
answer
860
views
JavaFX Exercise Application
This is a pre version of my program. This program is about solving exercises. Because this is one of my first graphical applications, I want to know, what can be improved. To this point I usually ...
2
votes
0
answers
778
views
A JavaFX for generating beeping sound on Windows via JNI
This is my practice program: a simple dialog box using which a user may specify a frequency of a sinus audio signal, and play it via pressing a button. It contains a GUI:
App.java
...
1
vote
0
answers
2k
views
Simple card game with updating GUI
I have coded a simple card game that updates the GUI each second and contains many nodes in game which are used to display game events and animation.
People who have tried the game said that their ...
0
votes
1
answer
846
views
Breaking up a simple Paint application into smaller classes
(Sorry this is a repeat post, I hadn't logged in on my initial question and am unable to respond)
I currently have a working code for a simple paint application but it is all in one file and very ...
5
votes
1
answer
3k
views
Simple Java Download Manager
I have written a simple download accelerator in java which downloads the same file in multiple threads and then combines them all.
I would love some feedback on my design. How the same implementation ...