Creating a Borderless Window JWindow window = new JWindow(); // Add component to the window. // The next two lines should be in one line. window.getContentPane().add(component, BorderLayout.CENTER); // Set initial size. window.setSize(300, 300); // Show the window. window.setVisible(true);