Hello,
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?
Thank you!
Francois
Andrew Thompson - 31 Mar 2007 10:06 GMT
...
> 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.
Mark Space - 31 Mar 2007 17:04 GMT
> Hello,
>
[quoted text clipped - 4 lines]
> Thank you!
> Francois
Why not just use JWindow?
Andrew Thompson - 31 Mar 2007 17:58 GMT
..
> > 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?
..
> Why not just use JWindow?
Excellent question.
(..but please trim replies of sigs., and other
unnecessary text)
Andrew T.