Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Jframe

Reply
Thread Tools

Jframe

 
 
Francois Lionet
Guest
Posts: n/a
 
      03-31-2007
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


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      03-31-2007
On Mar 31, 6:13 pm, "Francois Lionet" <(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
 
Mark Space
Guest
Posts: n/a
 
      03-31-2007
Francois Lionet wrote:
> 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
>
>


Why not just use JWindow?
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      03-31-2007
On Apr 1, 2:04 am, Mark Space <(E-Mail Removed)> wrote:
> Francois Lionet 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?

...
> Why not just use JWindow?


Excellent question.

(..but please trim replies of sigs., and other
unnecessary text)

Andrew T.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Get One JFrame To Appear Above Another JFrame clusardi2k@aol.com Java 2 08-27-2012 03:01 PM
start a new JFrame from an existing one, and when old JFrame closes new one does not jakester Java 3 04-02-2007 11:13 PM
Re: where is the JFrame constructor Passero Java 2 07-11-2003 11:05 PM
JFrame URL Link René Kikkenborg Java 1 07-09-2003 06:55 AM
Where is the JFrame constructor? Passero Java 6 07-05-2003 08:52 AM



Advertisments