We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,692 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to make a swing.properties file?

My computer does not have the swing.properties. How to make a swing.properties file and with what software?

3
Contributors
4
Replies
2 Hours
Discussion Span
1 Year Ago
Last Updated
5
Views
Question
Answered
jackbauer24
Posting Whiz in Training
244 posts since Oct 2011
Reputation Points: 21
Solved Threads: 3
Skill Endorsements: 0

notepad? it's basically just a textfile which you give the extension .properties

stultuske
Industrious Poster
4,366 posts since Jan 2007
Reputation Points: 1,318
Solved Threads: 610
Skill Endorsements: 23

Ok, so I made it with my text editor and wrote this:
swing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
expecting Nimbus. I still get Metal. Why?

jackbauer24
Posting Whiz in Training
244 posts since Oct 2011
Reputation Points: 21
Solved Threads: 3
Skill Endorsements: 0

I have no idea. how are you using that properties file in your code?

stultuske
Industrious Poster
4,366 posts since Jan 2007
Reputation Points: 1,318
Solved Threads: 610
Skill Endorsements: 23

another way to specify the current L&F is to use the swing.properties file to set the swing.defaultlaf property. This file, which you may need to create, is located in the lib directory of Sun's Java release (other vendors of Java may use a different location). For example, if you're using the Java interpreter in javaHomeDirectory\bin, then the swing.properties file (if it exists) is in javaHomeDirectory\lib

http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html#properties

JamesCherrill
... trying to help
Moderator
8,497 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,454
Skill Endorsements: 29
Question Answered as of 1 Year Ago by stultuske and JamesCherrill

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0737 seconds using 2.66MB