Article View: borland.public.jbuilder.java.swing
Article #578Re: Frame WindowDecorationStyle
From: Lori M Olson [TeamB]
Date: Tue, 22 Feb 2005 17:45
Date: Tue, 22 Feb 2005 17:45
53 lines
2991 bytes
2991 bytes
Oliver wrote:
> Hello,
>
> i have a frame which i show on top of my main application.
> Before that, the main application starts another Java application via a special RemoteControl.jar. The frame looks different if this other Java application has been started (frame with a green border) or not (frame with a violet border).
>
> I�m not sure what setUndecorated does and setWindowDecorationStyle(JRootPane.Frame).
>
> kind regards
>
> Oliver
>
> private void ShowAndPrintReport(Report Rep) {
> if (Rep==null) {ErrorMessage ("Kein Report verf�gbar.");
> return;}
> PrintTestFrame frame = new PrintTestFrame(Rep.Lines,false);
> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
> frame.setUndecorated(true);
> frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); // sieht gut aus!
> frame.show();
> }
>
>
This techtip describes what setUndecorated does:
http://java.sun.com/developer/JDCTechTips/2005/tt0118.html#2
It looks like this code is trying to remove all window decorations, and
then set the window decorations to those appropriate for a Frame.
I'm not convinced that frame.setUndecorated(true) is useful, given the
subsequent statement, but ... it's hard to tell without running the code.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<421b6f9b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<421b653f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,53b62d4aad497d43 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII Date: Tue, 22 Feb 2005 10:45:00 -0700 From: "Lori M Olson [TeamB]" <javadragon@techie.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax;nscd1) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Frame WindowDecorationStyle References: <421b653f$1@newsgroups.borland.com> In-Reply-To: <421b653f$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 142.179.181.200 Message-ID: <421b6f9b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109094299 142.179.181.200 (22 Feb 2005 09:44:59 -0800) Lines: 53 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail