• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Visualising Data in a Table with Separate Remove Buttons

 
Mike Matthews
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.)
 
Alejandro Ortiz
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

 
John Damien Smith
Ranch Hand
Posts: 296
14
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic