9899100101102103104105
viewer.setPreferredSize(size); viewer.setSize(size); viewer.setLocation(BORDER_WIDTH, BORDER_WIDTH); add(viewer); viewer.revalidate(); viewer.repaint(); } }