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.

Filter by
Sorted by
Tagged with
2 votes
2 answers
89 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 ...
F.M's user avatar
  • 129
2 votes
1 answer
75 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 ...
coderodde's user avatar
  • 27.7k
3 votes
1 answer
76 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. ...
hathor's user avatar
  • 31
3 votes
1 answer
54 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 ...
Damian's user avatar
  • 31
1 vote
0 answers
41 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: ...
coderodde's user avatar
  • 27.7k
3 votes
1 answer
59 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 ...
coderodde's user avatar
  • 27.7k
2 votes
1 answer
80 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 ...
coderodde's user avatar
  • 27.7k
0 votes
1 answer
87 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 ...
coderodde's user avatar
  • 27.7k
3 votes
0 answers
268 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: ...
coderodde's user avatar
  • 27.7k
3 votes
1 answer
164 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 ...
user3605767's user avatar
4 votes
1 answer
123 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: ...
coderodde's user avatar
  • 27.7k
3 votes
0 answers
198 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 ...
Amal K's user avatar
  • 173
5 votes
2 answers
119 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 ...
Spencer Login's user avatar
6 votes
1 answer
482 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 ...
Abeer's user avatar
  • 63
1 vote
0 answers
85 views

Advice on Update function in my Game Loop [closed]

I have this update fx for my Player object in game loop, game is top-down in-space thing with boom-booms and such. Me being weak at maths is huge understatement so my implementation is concoction of ...
Jan Šebek's user avatar
5 votes
1 answer
629 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 ...
puppeteer's user avatar
3 votes
1 answer
262 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 ...
clartaq's user avatar
  • 257
2 votes
0 answers
54 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 ...
Thomas Herondale's user avatar
1 vote
0 answers
34 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 ...
Finsho's user avatar
  • 11
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 ...
user238716's user avatar
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 ...
cervonwong's user avatar
2 votes
0 answers
643 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 ...
SA.93's user avatar
  • 123
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 ...
qwerty's user avatar
  • 361
3 votes
1 answer
105 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 ...
WLTY's user avatar
  • 41
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 ...
Michael Sims's user avatar
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 ...
Jamie Bovington's user avatar
7 votes
1 answer
624 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 ...
maggle's user avatar
  • 171
3 votes
0 answers
450 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: ...
bychtromae's user avatar
2 votes
0 answers
43 views

Optimize animation, use parameters for different types of objects and work with VBox

...
Michal Rama's user avatar
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 ...
Michal Rama's user avatar
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 ...
geometrikal's user avatar
6 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: ...
Marten's user avatar
  • 585
1 vote
1 answer
149 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 ...
CorellianAle's user avatar
1 vote
1 answer
489 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 ...
NoProg's user avatar
  • 23
6 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, ...
kane's user avatar
  • 63
1 vote
1 answer
832 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 ...
user avatar
2 votes
0 answers
733 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 ...
coderodde's user avatar
  • 27.7k
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 ...
Altuğ Ceylan's user avatar
0 votes
1 answer
817 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 ...
HR32's user avatar
  • 1
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 ...
Gnik's user avatar
  • 882
1 vote
1 answer
383 views

JavaFX controller for a poker game

I am making a poker application in JavaFX. When I try to display the cards on the screen it is working perfectly fine. Yet I have a method with a lot of duplicated code in it. I have tried to ...
TheRealCodeGuy's user avatar
2 votes
0 answers
367 views

KeyEvent listener: mapping physical keyboard to onscreen keyboard [closed]

I have an assignment to create a GUI with a keyboard and text area. Conceptually, the user would type on the physical keyboard and the respective key would change background on screen to reflect that ...
legoMyEgo's user avatar
  • 167
3 votes
1 answer
1k views

Media player component with JavaFX

I am trying to build a media player as a part of a bigger project in JavaFX. It is a simple media player as of now, which requires a Presentation component to ...
twodee's user avatar
  • 220
2 votes
1 answer
87 views

Cards for Monster, Spell and Trap interfaces [closed]

So I wrote a card game in Java/JavaFX but I don't particularly like this solution and I was wondering if you guys have any better solutions: ...
Dusko Mirkovic's user avatar
3 votes
2 answers
1k views

Creating user accounts

I have a method which allows to create user account. It contains some conditions to control empty fields, wrong format of email, weak password, etc. ...
Menai Ala Eddine - Aladdin's user avatar
2 votes
0 answers
273 views

Encapsulation of putpixel is terribly slow in JavaFx

I am trying to write a simple rendering engine in JavaFx and I manage encapsulate putpixel in the way that I pass x,y coordinates and color and it draws pixel of that color to the screen. I also wrote ...
TheTask1337's user avatar
4 votes
1 answer
5k views

Minesweeper JavaFX app

This is my Minesweeper JavaFx app. It is working without any weird bugs, at least none that I found. I am not too concerned about the way it looks either, the main reason I post this here is to get an ...
Khepu's user avatar
  • 43
5 votes
1 answer
1k views

Cookie Clicker in JavaFX

Download the Program I have written a Cookie Clicker Game with JavaFX. I have not much experience so I guess that the code looks terrible to a person that is familar with JavaFX. So lets improve that!...
Dexter Thorn's user avatar
  • 2,164
5 votes
1 answer
3k views

JavaFX Checkers game

I started self teaching myself Java a few months ago. I recently came to the point where I felt it was time to blackout myself from any help or guiding material other than Oracle's docs, so I made a 2 ...
tdct's user avatar
  • 51
7 votes
1 answer
390 views

A Game of Life application, with mouse clicks

I have a Game of Life program that has a grid[][] array which is populated by Cell objects. If there's a cell in a grid square, ...
woodStone's user avatar
  • 143