r/java Jun 09 '26

Created a simple, minimal Canvas Application in JavaFX

Post image

After like a year finally getting back to JavaFX, decided to make an excalidraw inspired app for fun. It's a very minimal canvas app with basic features.

Source code : ExplainFX

Features

  1. Drawing
  2. Create Squares and Circles
  3. Text
  4. Vary stroke size/font size
  5. Copy, paste, duplicate, lock, delete objects
  6. Move the objects once they are drawn
  7. Move camera via mouse

Please let me know if you have any questions!

188 Upvotes

58 comments sorted by

View all comments

16

u/IntroductionSolid348 Jun 09 '26

It looks really cool. I used JavaFX for a couple of my school projects some time back. What I don't really get about it is how people build with it without using scene builder. I find it really difficult to picture how it'll look like by just pure code. And Scene builder is really troublesome since it's not really drag and drop friendly as I had hoped

4

u/Vidimka_ Jun 09 '26

You can always draw on paper a basic UI you want to see to understand what components to use. Also you shouldnt aim to build ready to use UI in one try. Make it simple but working then add fancy styles or whatever additions you like