Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tabulate data to JTable  RSS feed

 
John Joe
Ranch Hand
Posts: 343
2
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



 
Carey Brown
Bartender
Posts: 2707
41
Eclipse IDE Firefox Browser Java MySQL Database VI Editor 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?
 
Norm Radder
Rancher
Posts: 2052
26
 
John Joe
Ranch Hand
Posts: 343
2
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: 343
2
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!