• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Dynamic Visualising Data in a Table with Separate Remove Buttons

 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I'm making a small app for myself to review what I have learned in Java before. It's a simple daily expenditure calculator. Basically it should allow to add and remove entries (e.g. trousers, dinner), the app should then present them in a table and give an average daily expenditure below. I have all classes and methods ready. Now I only need to lay everything out.

I want to be able to add and remove entries easily and effectively. I was considering using JavaFX' TableView with separate remove button for each entry, but I have no clue how.

Can anyone offer a solution? Perhaps there's a better way than using JavaFX. (I want to learn to make apps that are visually attractive and intuitive.)
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here are son tutorial videos that explain how tableview functions and how add and remove items, if you are new to JavaFX i would recomend that you follow all the videos there are short and very understandable

[youtube]https://www.youtube.com/watch?v=mtdlX2NMy4M[/youtube] [youtube]https://www.youtube.com/watch?v=q1LEN2assfU[/youtube] [youtube]https://www.youtube.com/watch?v=uz2sWCnTq6E[/youtube]
 
Rancher
Posts: 387
30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle provide a tutorial featuring a TableView with an Add button:
https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/table-view.htm
Makery also provide a more comprehensive tutorial and example for manipulating table based data, which I fully recommend, as it is both excellent and relevant to the task you are trying to achieve:
http://code.makery.ch/library/javafx-8-tutorial/
 
Mike Matthews
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Alejandro! I've already seen most of the videos from the series you mentioned and I admit they're helpful.

I learned plenty since I made this thread. I also solved the problem. Instead of adding separate remove button for each object, I added controls below the table. I might try separate buttons for the sake of learning something new, especially since I managed to find similar solutions on the web.

Also, thanks, John! I'll definitely have a look at the tutorial by Makery.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic