Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Store HexDecimal Color Code in .properties file?

  1. #1
    Member
    Join Date
    Apr 2011
    Posts
    32
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Store HexDecimal Color Code in .properties file?

    I am trying to make my program/application more customizeable, but here's the problem:

    The color codes it uses are are integers in the form of 0xffffff and so on, but when I save it to a .properties file using String.valueOf(myColorCode), it saves it as a really long integer. Is there any way to preserve the format when reading and writing from a properties file?


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Store HexDecimal Color Code in .properties file?

    Try the Integer.toHexString method instead.

Similar Threads

  1. text color changer based on words/ word classification by color
    By knoxy5467 in forum Java Theory & Questions
    Replies: 25
    Last Post: June 15th, 2011, 07:52 AM
  2. Help with making the user input to store in file
    By dannyyy in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 6th, 2011, 06:52 AM
  3. select a color from a png file
    By strider in forum Java Theory & Questions
    Replies: 2
    Last Post: December 2nd, 2010, 06:20 AM
  4. Structured Properties File?
    By moka in forum Java Theory & Questions
    Replies: 7
    Last Post: October 19th, 2010, 11:14 AM
  5. Accessing Properties File
    By java_mein in forum Java Servlet
    Replies: 5
    Last Post: May 14th, 2010, 02:44 AM