Simple Mistake?? Or is it??

on another topic now, i have gone past this and i have decided to try some example code i have found to try and code a little shop....althought everything has compiled correctly apart from the main java class file....and for some reason it cannot find a private method that is in the same class?? i have no idea why, does anyone know why this cannot find this??

the code i have acheived is below: -

 ---THIS DOESNT WORK
    I                ---THIS DOESNT WORK
    fruitStandsPanel.selectTab(0);
    fruitMartPanel.add(fruitStandsPanel);
    fruitMartPanel.setCellHeight(fruitStandsPanel, "100%");
    fruitMartPanel.setCellWidth(fruitStandsPanel, "75%");

    //the basket panel
    VerticalPanel fruitBasketPanel = new VerticalPanel();
    fruitBasketPanel.setHeight("100%");
    fruitBasketPanel.setWidth("25em");
    Label fruitBasketLabel = new Label("Fruit Basket");
    fruitBasketLabel.addStyleName("fruitBasketLabel");
    fruitBasketPanel.add(fruitBasketLabel);
    I          ---THIS DOESNT WORK
    Button fruitBasketConfirmButton = new Button();
    fruitBasketConfirmButton.setText("Confirm");
    fruitBasketPanel.add(fruitBasketConfirmButton);
    fruitMartPanel.add(fruitBasketPanel);
    fruitMartPanel.setCellHeight(fruitBasketPanel, "100%");
    fruitMartPanel.setCellWidth(fruitBasketPanel, "25%");

    mainPanel.add(topPanel);
    mainPanel.add(fruitMartPanel);
    mainPanel.setCellHeight(topPanel, "10%");
    mainPanel.setCellHeight(fruitMartPanel, "90%");

    RootPanel.get().add(mainPanel);

  }

  private void attachFruitBasketItems(VerticalPanel fruitBasketPanel) {

    //CODE IS HERE, COMPILES CORRECTLY AND SHOULD WORK FINE

  }

  private void attachFruitStandsTabs(TabPanel fruitStandsTabPanel) {

  //AGAIN CODE IS HERE, COMPILES CORRECTLY AND SHOULD WORK FINE 
  
  }]]>


I just cannot understand why the onLoadMethod cannot see the correct methods that i have defined in the same class?? what am i doing wrong??


Many Thanks

Please sign in to leave a comment.