Board index » jbuilder » Frame WindowDecorationStyle

Frame WindowDecorationStyle


2005-02-23 01:00:47 AM
jbuilder20
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();
}
 
 

Re:Frame WindowDecorationStyle

Oliver wrote:
Quote
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:
java.sun.com/developer/JDCTechTips/2005/tt0118.html
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
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html