package pkgSwing;

import javax.swing.*;
import java.awt.*;

/**
 * Created by DS on 12.04.2017.
 * demo of child window
 */
class ChildFrame extends JFrame {
    ChildFrame()
    {
        final Dimension size = new Dimension(500,500);
        final int xcenter = (int)((GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode().getWidth()-size.getWidth())/2);
        final int ycenter = (int)((GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode().getHeight()-size.getHeight())/2);
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        setLocation(xcenter,ycenter);
        setSize(size);
        setTitle("Child Frame");
        setVisible(true);

    }
}

@@ -58,16 +58,20 @@
 *;%0A%0A/**%0A
+ * %0A
  * Creat
@@ -118,16 +118,19 @@
  window%0A
+ *%0A
  */%0Aclas

change comment