I am new to programming and I am using a mvc format for my java assignment. I am not sure how to make the XML data load unto the graphic table. When I run the program the table appears but the data is not in the headers and lines. It seems I am missing something in either the controller or view class...
public class Controller
{
Model model;
View view;
public Controller(Model m, View v)
{
model = m;
view = v;
FootballPlayerData fp = m.getFpData();
fp.ReadPlayersFromXML();
view.CenterUpdate(model.getFpData().getLines(model.getFpData().getFirstLineToDisplay(),
model.getFpData().getLastLineToDisplay()),
//data coming as an ArrayList of ArrayList of String
model.getFpData().getHeaders());
//headers data (name, position, etc...) coming as an ArrayList of String
view.CenterInitialSetup(model.getFpData().getLinesBeingDisplayed(), model.getFpData().size());
}
public class View {
private final InitialFrame iframe;
public View() {
iframe = new InitialFrame();
}
// member functions
// public void CenterInitialSetup(int lbd, int numCols) {
// iframe.getInitialPanel().getCp().CenterInitialSetup(lbd, numCols);
// }
public void CenterUpdate(ArrayList< ArrayList< String>> data, ArrayList< String> headers) {
}
public void CenterInitialSetup(int linesBeingDisplayed, int size) {
throw new UnsupportedOperationException("Not supported yet.");
}
}