public void init() {
		buildMenu();
		
		//make a split panel
		splitPanel = new HorizontalSplitPanel();
		splitPanel.setSizeFull();
		splitPanel.setSplitPosition(25, Sizeable.UNITS_PERCENTAGE);
		splitPanel.setLocked(false);
		splitPanel.setVisible(true);
	
		//make a tree as the first component
		webpageTree = new Tree("Your Site's Web Pages");
		webpageTree.setSizeUndefined();
		webpageTree.addItem("Your Website");
		webpageTree.setImmediate(true);
		
		splitPanel.setFirstComponent(webpageTree);
		
		//make a text area as the second component
		webpageText = new RichTextArea();
		webpageText.setSizeFull();
		splitPanel.setSecondComponent(webpageText);
		
		webpageTree.addListener(new Property.ValueChangeListener() {
			
			@Override
			public void valueChange(ValueChangeEvent event) {
				if (event.getProperty().getValue() != null) {
					
					Website2EbookmakerApplication app = ((Website2EbookmakerApplication)MainLayout.this.getApplication());
		            if (currentPage.equals(websitename)) {     	
						app.getWebScraper().saveFormattedPageText(currentPage, (String) webpageText.getValue());
		            }
		            else if (!currentPage.isEmpty()) {
		            	if (currentPage.startsWith(websitename)) {
							app.getWebScraper().saveFormattedPageText(currentPage, (String) webpageText.getValue());
		            	}
		            	else {
							app.getWebScraper().saveFormattedPageText(websitename + "/" + currentPage, (String) webpageText.getValue());
		            	}
		            }
					
					if (!((String)event.getProperty().getValue()).startsWith(websitename)) {
		            	webpageText.setValue(app.getWebScraper().getPageText(websitename + "/" + (String) event.getProperty().getValue()));
		            }
		            else {
		     
		            	webpageText.setValue(app.getWebScraper().getPageText((String) event.getProperty().getValue()));
		            }
		            currentPage = (String) event.getProperty().getValue();
		            webpageText.requestRepaint();
		        } else {
		        	webpageText.setValue("");
		        }				
			}
		});
		
		this.addComponent(splitPanel);
		this.setExpandRatio(splitPanel, 0.9f);
	}