Re: Jframe



On Mar 31, 6:13 pm, "Francois Lionet" <flio...@xxxxxxxxxx> wrote:
....
In my application, I open a JFrame, and I need this frame to be
caption-less. Can someone tell me how to get rid of the title bar and the
border?

<sscce>
import javax.swing.*;

class UndecoratedFrame {

public static void main(String[] args) {
JFrame f = new JFrame();
f.setUndecorated(true);
f.getContentPane().add(
new JLabel("How do you close me?"));
f.pack();
f.setLocationRelativeTo(null);
f.setVisible(true);
}
}
</sscce>

Andrew T.

.



Relevant Pages