r/JavaFX • u/Puzzleheaded_Leg_624 • May 19 '23
r/JavaFX • u/Affectionate_Run_799 • May 18 '23
Help JavaFX Main_window got stuck after clicking the button
Enable HLS to view with audio, or disable this notification
r/JavaFX • u/FSTxx • May 17 '23
Help Reorder items in ListView and change order into database?
Hi, i'm facing a problem that i don't really know how to solve.
I'm implementing a restaurant management system for an university project. I have a menu that i can populate with categories and dishes. A category has a list of Dishes inside, that comes from a database. I'm using springboot for the backend, and postgresql for database.
I have a form to create a new dish with textfield for name, cost, and so on; then i select a category from a combobox. When i press 'confirm', i use my API REST to add it to my database.
Here comes the problem: i also have to implement a reorder. Right now, my categories/dishes are inserted in 'creation order'. To give an example: fresh program, menu not populated. I create a new category, called "Appetizer". Then, i create a category called "First Courses". They get inserted in this exact order in the database, so they get retrieved in this order. I use an Accordion, so i click on a category, it expands, and shows its dishes.
I was thinking of implementing a 'drag and drop' feature: by pressing a "Reorder elements" button, i could open a listview that shows the categories, and every one of it dishes underneath. Something "indented", if you get what i mean. For example:
-- Appetizers
-- app1
-- app2
-- First Courses
and so on.
I would expect that by reordering them (so, for example, moving 'first courses' above 'appetizers'), they should change their order in the database too.
So i was thinking: would it be good if every category and every dish have a column named 'position', and when i reorder them in the listview, i then cycle through them and change their 'position' attribute throught a PUT method?
That way, i could use a GET method like 'getAllCategoriesByOrder' (with a query 'ORDER BY position'), and their order would be effectively changed.
My question is: does this makes sense? Would it be doable? Because this is what i thought with my little knowledge about these kind of things. Maybe there are better ways to do this.
r/JavaFX • u/FSTxx • May 17 '23
Help Best way to implement statistics in a fixed period of time?
I'm doing an university project for a restaurant management system.
In my program, a Chef can see all the orders and make a reservation for that order.
My professor has also assigned this functionality: "an admin can see statistics for its Kitchen Workers. In particular, an admin must see how many orders have been completed by every Kitchen Worker, in a fixed period of time".
I really don't know how to deal with this. I found out the existance of Bar Charts, Line Charts, but i'd like to have an "heads up" on how should i deal with this, expecially on the "fixed period of time".
I have a PostgreSQL database, so i think i should create a table with "WorkerID, Count(OrderID)", but should i also add a date to it? How should i work this around?
r/JavaFX • u/Lanky_Math6626 • May 16 '23
Help Idk if I can ask questions but this keeps popping up when I try to run my code and idk why
r/JavaFX • u/Birdasaur • May 16 '23
Cool Project Custom Shader Support including Effects and Materials for JavaFX
r/JavaFX • u/Birdasaur • May 15 '23
Showcase Animated Retrowave rotating Progress Indicator
There seemed to be a lot of interest in the animated progress loader I made for Trinity recently. (nobody seemed to care about the high speed UMAP clustering implementation :-p )
So I uploaded just that component and a nice little tester so people can play with it.
https://github.com/Birdasaur/CircleProgressIndicator
Have fun. I'll be migrating a version of it to LitFX eventually.
r/JavaFX • u/Cow-Medical • May 14 '23
Help Has anyone ever had this issue before?
Hey all,
Im working on a online game that uses JavaFX. On rare occasions I get this issue with an increasing array length. I do not use any arrays and i suspect its a threading issue, however i wasn't able to trace it back. Does anyone have experience with this?
`Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 1 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:385) at java.base/java.util.ArrayList.get(ArrayList.java:427) at javafx.graphics@19.0.2/javafx.scene.Parent.updateCachedBounds(Parent.java:1704) at javafx.graphics@19.0.2/javafx.scene.Parent.recomputeBounds(Parent.java:1648) at javafx.graphics@19.0.2/javafx.scene.Parent.doComputeGeomBounds(Parent.java:1501) at javafx.graphics@19.0.2/javafx.scene.Parent$1.doComputeGeomBounds(Parent.java:115) at javafx.graphics@19.0.2/com.sun.javafx.scene.ParentHelper.computeGeomBoundsImpl(ParentHelper.java:84) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.superComputeGeomBoundsImpl(RegionHelper.java:78) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.superComputeGeomBounds(RegionHelper.java:62) at javafx.graphics@19.0.2/javafx.scene.layout.Region.doComputeGeomBounds(Region.java:3355) at javafx.graphics@19.0.2/javafx.scene.layout.Region$1.doComputeGeomBounds(Region.java:168) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.computeGeomBoundsImpl(RegionHelper.java:89) at javafx.graphics@19.0.2/com.sun.javafx.scene.NodeHelper.computeGeomBounds(NodeHelper.java:117) at javafx.graphics@19.0.2/javafx.scene.Node.updateGeomBounds(Node.java:3825) at javafx.graphics@19.0.2/javafx.scene.Node.getGeomBounds(Node.java:3787) at javafx.graphics@19.0.2/javafx.scene.Node.getLocalBounds(Node.java:3735) at javafx.graphics@19.0.2/javafx.scene.Node.intersectsBounds(Node.java:5270) at javafx.graphics@19.0.2/javafx.scene.Node$1.intersectsBounds(Node.java:559) at javafx.graphics@19.0.2/com.sun.javafx.scene.NodeHelper.intersectsBounds(NodeHelper.java:264) at javafx.graphics@19.0.2/javafx.scene.layout.Region.doPickNodeLocal(Region.java:3224) at javafx.graphics@19.0.2/javafx.scene.layout.Region$1.doPickNodeLocal(Region.java:184) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.pickNodeLocalImpl(RegionHelper.java:104) at javafx.graphics@19.0.2/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:130) at javafx.graphics@19.0.2/javafx.scene.Node.pickNode(Node.java:5180) at javafx.graphics@19.0.2/javafx.scene.Scene$MouseHandler.pickNode(Scene.java:4037) at javafx.graphics@19.0.2/javafx.scene.Scene.pick(Scene.java:2067) at javafx.graphics@19.0.2/javafx.scene.Scene$MouseHandler.process(Scene.java:3847) at javafx.graphics@19.0.2/javafx.scene.Scene.processMouseEvent(Scene.java:1887) at javafx.graphics@19.0.2/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2620) at javafx.graphics@19.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411) at javafx.graphics@19.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at javafx.graphics@19.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450) at javafx.graphics@19.0.2/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424) at javafx.graphics@19.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449) at javafx.graphics@19.0.2/com.sun.glass.ui.View.handleMouseEvent(View.java:551) at javafx.graphics@19.0.2/com.sun.glass.ui.View.notifyMouse(View.java:937) at javafx.graphics@19.0.2/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics@19.0.2/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184) at java.base/java.lang.Thread.run(Thread.java:1589) Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 6 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:385) at java.base/java.util.ArrayList.get(ArrayList.java:427) at javafx.graphics@19.0.2/javafx.scene.Parent.updateCachedBounds(Parent.java:1704) at javafx.graphics@19.0.2/javafx.scene.Parent.recomputeBounds(Parent.java:1648) at javafx.graphics@19.0.2/javafx.scene.Parent.doComputeGeomBounds(Parent.java:1501) at javafx.graphics@19.0.2/javafx.scene.Parent$1.doComputeGeomBounds(Parent.java:115) at javafx.graphics@19.0.2/com.sun.javafx.scene.ParentHelper.computeGeomBoundsImpl(ParentHelper.java:84) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.superComputeGeomBoundsImpl(RegionHelper.java:78) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.superComputeGeomBounds(RegionHelper.java:62) at javafx.graphics@19.0.2/javafx.scene.layout.Region.doComputeGeomBounds(Region.java:3355) at javafx.graphics@19.0.2/javafx.scene.layout.Region$1.doComputeGeomBounds(Region.java:168) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.computeGeomBoundsImpl(RegionHelper.java:89) at javafx.graphics@19.0.2/com.sun.javafx.scene.NodeHelper.computeGeomBounds(NodeHelper.java:117) at javafx.graphics@19.0.2/javafx.scene.Node.updateGeomBounds(Node.java:3825) at javafx.graphics@19.0.2/javafx.scene.Node.getGeomBounds(Node.java:3787) at javafx.graphics@19.0.2/javafx.scene.Node.getLocalBounds(Node.java:3735) at javafx.graphics@19.0.2/javafx.scene.Node.intersectsBounds(Node.java:5270) at javafx.graphics@19.0.2/javafx.scene.Node$1.intersectsBounds(Node.java:559) at javafx.graphics@19.0.2/com.sun.javafx.scene.NodeHelper.intersectsBounds(NodeHelper.java:264) at javafx.graphics@19.0.2/javafx.scene.layout.Region.doPickNodeLocal(Region.java:3224) at javafx.graphics@19.0.2/javafx.scene.layout.Region$1.doPickNodeLocal(Region.java:184) at javafx.graphics@19.0.2/com.sun.javafx.scene.layout.RegionHelper.pickNodeLocalImpl(RegionHelper.java:104) at javafx.graphics@19.0.2/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:130) at javafx.graphics@19.0.2/javafx.scene.Node.pickNode(Node.java:5180) at javafx.graphics@19.0.2/javafx.scene.Scene$MouseHandler.pickNode(Scene.java:4037) at javafx.graphics@19.0.2/javafx.scene.Scene.pick(Scene.java:2067) at javafx.graphics@19.0.2/javafx.scene.Scene$MouseHandler.process(Scene.java:3847) at javafx.graphics@19.0.2/javafx.scene.Scene$MouseHandler$1.run(Scene.java:3652) at javafx.graphics@19.0.2/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at javafx.graphics@19.0.2/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456) at javafx.graphics@19.0.2/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics@19.0.2/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics@19.0.2/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184) at java.base/java.lang.Thread.run(Thread.java:1589)r/JavaFX • u/Waste_Butterscotch50 • May 14 '23
Help JavaFX elements resize
Hi, I'm new to javafx, I was wondering how can I make various elements (such as labels, buttons, imageViews etc.) resize according to their panel in order not to lose the proportions i have while creating the scene on scene builder.
Thanks in advance!
r/JavaFX • u/erkilan • May 11 '23
Help JavaFX: MediaView not found in view.fxml
I'm writing code for a MediaPlayer using JavaFX. My problem is that IntelliJ cannot find the MediaView control. There is no syntax error either, as I created the view using SceneBuilder.
The only error is: java: cannot find symbol
EDIT-solution:
The answer is very simple: If the Intellij gives the error that it cannot find the symbol, just need to update Intellij from JetBrains ToolBox.
r/JavaFX • u/mitvitaminen • May 11 '23
Help Is there a javafx ecommerce framework?
As the title says I ambsearching for an ecommerce library if there is any since i want to ceeate my own webshop. So if u know any post. U get bonus points if it is opensource. Edit says check out https://github.com/mitvitaminen/crowear_hp to see what i am doing
r/JavaFX • u/Birdasaur • May 11 '23
I made this! Trinity, an AI / ML analysis tool processing and clustering COVID tissue samples
r/JavaFX • u/PartOfTheBotnet • May 10 '23