how to JTable...

+2 Emmanuel Ntiamoah · November 5, 2014
Hello guys currently need some help on how to  feed JTable with data from a button pressed and dynamically add rows to it.

counting on your usually help. Thanks 

Post a Reply


- page 1
Oldest  Newest  Rating
0 Developer John · November 10, 2014
How is the data being put into each cell? Please be specific.

P.S., may I see the code for it as well?
0 Developer John · November 11, 2014
Hello? You there?
0 Emmanuel Ntiamoah · November 19, 2014
when a button is pressed
0 Developer John · November 19, 2014
Yes, but inserted with a Scanner right?
0 Emmanuel Ntiamoah · November 23, 2014
Look this is what actually wanna do,

jux like a button that calculates the cost of an item when clicked. so when this button is clicked then recorded in the JTable . i.e the item and its cost
0 Developer John · November 23, 2014
So you need the code for it? lol:sideways:
0 Homer Simpson · November 23, 2014 
0 Developer John · November 23, 2014
0 Developer John · November 23, 2014
So basically, all your indexes are stored in a string array (I don't know what the name of the array is). In order for the button to input the information into a specific cell, you would have to get the string index and set it equal to your user input. Once that's done, if you want, you can make a method for overwriting, so that later on, you can make changes to that specific cell if needed. Hey Homer, he even teaches you about the modulus lol.
0 Emmanuel Ntiamoah · November 24, 2014
wow! ,  thanks John
  • 1
  • 2

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator