Simple Mistake?? Or is it??

This is a discussion on Simple Mistake?? Or is it?? within the J2EE forums in Framework and Interface Programming category; 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: - Code: public class FruitMart implements EntryPoint { public void onModuleLoad() { VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setWidth("100%"); mainPanel.setHeight("100%"); //the top panel displaying the FruitMart title ...

Go Back   Application Development Forum > Framework and Interface Programming > J2EE

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-13-2008, 09:03 AM
ben
Guest
 
Default 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: -

Code:
public class FruitMart implements EntryPoint {

public void onModuleLoad() {

VerticalPanel mainPanel = new VerticalPanel();
mainPanel.setWidth("100%");
mainPanel.setHeight("100%");

//the top panel displaying the FruitMart title
HorizontalPanel topPanel = new HorizontalPanel();
topPanel.setWidth("100%");
topPanel.setHeight("100%");
topPanel.setStyleName("topPanel");

Label fruitMartLabel = new Label("FruitMart");
fruitMartLabel.setStyleName("mainPanel");
topPanel.add(fruitMartLabel);


//the panel where the fruit stands and fruit basket are displayed
HorizontalPanel fruitMartPanel = new HorizontalPanel();
fruitMartPanel.setWidth("100%");
fruitMartPanel.setHeight("100%");

//the tab panel with all the different sections
TabPanel fruitStandsPanel = new TabPanel();
fruitStandsPanel.setHeight("100%");
fruitStandsPanel.setWidth("75%");
I<attachFruitStandsTabs(fruitStandsPanel);> ---THIS DOESNT WORK
I<fruitStandsPanel.selectTab(0);>                ---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<attachFruitBasketItems(fruitBasketPanel);>          ---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
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:23 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.