Here you can find the source of initialiseFrame(JDialog frame, JScrollPane viewport)
private static void initialiseFrame(JDialog frame, JScrollPane viewport)
//package com.java2s; //License from project: LGPL import javax.swing.*; import java.awt.*; public class Main { private static void initialiseFrame(JDialog frame, JScrollPane viewport) { frame.add(viewport);//from ww w . jav a 2 s. c om frame.setSize(1100, 800); frame.setLocation(new Point(200, 100)); frame.setModal(true); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.setVisible(true); } }