?
Solved

Java Synth Look and Feel  Frame Borders.

Posted on 2011-04-19
8
Medium Priority
?
960 Views
Last Modified: 2012-06-21
Hi. I am designing look and fell using xml.

I designed everything but I can not changed windows borders style.

I apply my synth via this code. there is no problem without bordes.

SynthLookAndFeel lookAndFeel = new SynthLookAndFeel();
//this.setUndecorated(true);
this.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

            try {
                  lookAndFeel.load(NewJFrame.class.getResourceAsStream(synthFile),
                                          NewJFrame.class);
                UIManager.setLookAndFeel(lookAndFeel);
            }

            catch (Exception e) {
                System.err.println("Couldn't get specified look and feel ("
                                   + lookAndFeel
                                   + "), for some reason.");
                System.err.println("Using the default look and feel.");
                e.printStackTrace();
}



But frame borders icons. newer seen i have designed.

my Xml code like this.

<style id="rootPane">
   
   

    <string id="rootPaneTitlePaneBackground">images/RootBackg.png</string>
    <defaultsProperty key="RootPane.titlePane.background" type="idref" value="rootPaneTitlePaneBackground"/>
    <defaultsProperty key="RootPane.titlePane.background.verticalTiled" type="boolean" value="true"/>

    <string id="rootPaneTitlePaneBackgroundSelected">images/RootBackg.png</string>
   
    <string id="rootPaneBorder">images/RootBackg.png</string>
    <defaultsProperty key="RootPane.border" type="idref" value="rootPaneBorder"/>

    <string id="rootPaneBorderSelected">images/RootBackg.png</string>
    <defaultsProperty key="RootPane.border.selected" type="idref" value="rootPaneBorderSelected"/>

    <defaultsProperty key="RootPane.border.insets" type="insets" value="28 4 4 4"/>
    <defaultsProperty key="RootPane.border.size" type="insets" value="4 4 4 4"/>
    <defaultsProperty key="RootPane.resizeInsets" type="insets" value="6 6 6 6"/>

   
  </style>
  <bind style="RootPaneStyle" type="region" key="RootPane"/>


what is the problem ?

is the frame is not root pane ?
0
Comment
Question by:Absente
  • 4
  • 4
8 Comments
 

Author Comment

by:Absente
ID: 35486924
any idea ?
0
 
LVL 92

Expert Comment

by:objects
ID: 35487823
are you sure it supports changing frame border?
0
 

Author Comment

by:Absente
ID: 35496658
if its not ? how can i Do ?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 92

Expert Comment

by:objects
ID: 35499070
you can check using:

LookAndFeel laf = UIManager.getLookandFeel( );
if (laf.getSupportsWindowDecorations( )) {

If it doesn't then theres not much you can do
0
 

Author Comment

by:Absente
ID: 35693147
Not working ? is there any sample project about this ?
0
 
LVL 92

Expert Comment

by:objects
ID: 35694975
whats not working?
0
 

Author Comment

by:Absente
ID: 35747670
the frame  border cant appear.
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 35751282
sorry still not folloowing. it doesn't appear when you try what exactl;y?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question