The Artima Developer Community
Sponsored Link

Java Answers Forum
swing.properties

1 reply on 1 page. Most recent reply: May 4, 2006 10:31 PM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
M Adawi

Posts: 9
Nickname: adawi
Registered: Mar, 2006

swing.properties Posted: May 4, 2006 10:43 AM
Reply to this message Reply
Advertisement
from java APIs documentation

public class UIManagerextends Objectimplements SerializableThis class keeps track of the current look and feel and its defaults. The default look and feel class is chosen in the following manner:

1- If the system property swing.defaultlaf is non-null, use it as the default look and feel class name.

2-If the Properties file swing.properties exists and contains the key swing.defaultlaf, use its value as default look and feel class name. The location of swing.properties may vary depending upon the implementation of the Java platform. In Sun's implementation this will reside in &java.home>/lib/swing.properties. Refer to the release notes of the implementation you are using for further details.

3-Otherwise use the Java look and feel.

q1 Why I cannot find swing.properties any where in my java home folder downloaded and installed from sun?

q2 What is difference between system properties and environment varaibles?


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: swing.properties Posted: May 4, 2006 10:31 PM
Reply to this message Reply
1. Because it does not exist
You can create this file and Java will use the parameters you set in there. If it doesn't exist or does not contain the required keys, default values will be used.

2. Java does not support environment variables. In Java all "environment variables" are stored in a class, most of them in the properties of System. Variables without a parent class do not exist.

Flat View: This topic has 1 reply on 1 page
Topic: Encoding Previous Topic   Next Topic Topic: obgects in methods

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use