Question: I am trying to set up a virtual table to display PV full schedule; however, it is coming up backward. Today's PV is reflected at
I am trying to set up a virtual table to display PV full schedule; however, it is coming up backward. Today's PV is reflected at month 24; not month 0 like ti should. Below is the code. Can I make a change to have PV ome up first?
private void jButtonFullScheduleActionPerformed(java.awt.event.ActionEvent evt) {
JTable sched=null;
DefaultTableModel mod;
if (f instanceof Pv) {
String[] cols={"Month","Discount","Present Value"};
String [] []t=new String[f.getTerm()][3];
mod=new DefaultTableModel(t, cols);
sched=new JTable(mod);
for (int i=0;i sched.setValueAt(i, i, 0); sched.setValueAt(c.format(f.getIntFactor(i+1)), i, 1); sched.setValueAt(c.format(f.getEndBal(i+1)), i, 2); } JScrollPane scrollP=new JScrollPane(sched); JDialog dg=new JDialog(); dg.add(scrollP); dg.setBounds(150, 400, 600, 300); dg.setVisible(true); dg.setLocationRelativeTo(null); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
