Have borders on a JWindow/JFrame : JWindow « Swing « Java Tutorial






import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JWindow;

public class Main{
  public static void main(String s[]) {
    JWindow win = new JWindow();

    JPanel pan = new JPanel();
    win.add(pan, "Center");

    pan.setLayout(new FlowLayout());
    pan.add(new JButton("Hello"));

    win.setSize(200, 200);
    win.setVisible(true);
  }
}








14.78.JWindow
14.78.1.Difference between JFrame and JWindow
14.78.2.Have borders on a JWindow/JFrame
14.78.3.Extending JWindowExtending JWindow
14.78.4.Center window
14.78.5.Center Within Parent