Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Vector Table applet not fully working... can't figure out why.  RSS feed

 
Dave Fletcher
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys.... this is an assignment for my class and it's almost done but I when I run the applet and put in values, the vector table shows the headings but none of the rows show up. I can't figure out why!!!

also please dont tell me things like I shouldn't be using vector tables or w/e because this is how we are supposed to do it. I just need to figure out what specifically is wrong with my code here that's making it not display the data rows.

For values, just use like 200, 3.5, 4, and 6000. Also I'm ignoring some of the double variables for now while I try to get the functionality working.



Any help is very appreciated!!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your problem involves this line

EndBal = 0;

read all the code associated with that line and you should figure it out
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual way of dealing with JTables is to start by adding a JTable to the GUI (usually in a JScrollPane as you have done). Then when you get a new set of data to display, you just create a new TableModel from that data and change the JTable to use that TableModel. No need for removing components from the GUI and adding them back, that often leads to trouble and it isn't a good strategy. (A DefaultTableModel would be a good choice, and that's the reason you might want to use Vectors for your data.)
 
Dave Fletcher
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn wrote:your problem involves this line

EndBal = 0;

read all the code associated with that line and you should figure it out


eh i finally got it... stuff was all out of order... im very unmotivated right now...
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope that doesn't mean you won't ShowSomeEffort. If you are too unmotivated to solve your problems, don't expect us to be motivated for you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!