private void createPreview() {
		page = new Page[pg.getNumberOfPages()];
		PageFormat pf = pg.getPageFormat(0);
		Dimension size = new Dimension((int)pf.getPaper().getWidth(), (int)pf.getPaper().getHeight());
		if(pf.getOrientation() != PageFormat.PORTRAIT)
		size = new Dimension(size.height, size.width);
		for(int i=0; i<page.length; i++) {
			jcb.addItem(i+1);
			page[i] = new Page(i, size);
			p.add(""+(i+1), new JScrollPane(page[i]));
		}
		for (int r: RES) {
			rcb.addItem(new Resolution (r));
		}
		rcb.setSelectedIndex(3);
		setTopPanel();
		this.getContentPane().add(p, "Center");
		this.setSize(size.width+20,size.height+40);
		this.setVisible(true);
		page[jcb.getSelectedIndex()].refreshScale();
	}