Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tabulate data to JTable

 
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I using JTable to tabular data. When JSpinner is clicked, it will get the item, quantity and the price and displayed to JTable.
   
The (JSpinner) e.getSource()).getValue() is used to get the value from the JSpinner. What I want to achieve is I want the value change instead of adding more rows. How to achieve this ?

Example
Salad  3   15

Instead of
   Salad  1    5
   Salad  2   10
   Salad  3   15



 
Saloon Keeper
Posts: 6029
58
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a different spinner for each row? How can you use e.getSource() to determine which row you want to modify?
 
Rancher
Posts: 3409
33
 
John Joe
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Carey Brown wrote:Do you have a different spinner for each row? How can you use e.getSource() to determine which row you want to modify?


Yes,I have different spinner in each row.
 
John Joe
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here the screenshot of my project image.
Capture.PNG
[Thumbnail for Capture.PNG]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!