Java examples for Swing:JFrame
Creating a Borderless Window
import java.awt.BorderLayout; import javax.swing.JLabel; import javax.swing.JWindow; public class Main { public void m() throws Exception { JWindow window = new JWindow(); // Add component to the window window.getContentPane().add(new JLabel(), BorderLayout.CENTER); // Set initial size window.setSize(300, 300);//from w ww. j av a 2s. c om // Show the window window.setVisible(true); } }