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: Retrieving the color property of a JButton

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Retrieving the color property of a JButton

    Hi guys...me again
    I solved the 1st problem of the functionality of my JButtons but now i need to know if there is a method of retrieving the color property of a particular JButton? any help will be appreciated


  2. #2
    Member snowguy13's Avatar
    Join Date
    Nov 2011
    Location
    In Hyrule enjoying a chat with Demise and Ganondorf
    Posts
    339
    My Mood
    Happy
    Thanks
    31
    Thanked 48 Times in 42 Posts

    Default Re: Retrieving the color property of a JButton

    The colors of components are referred to as the foreground (text color) and background colors. You can use the getters and for foreground and background to get those colors.

    Documentation here!
    Use highlight tags to help others help you!

    [highlight=Java]Your prettily formatted code goes here[/highlight]

    Using these tags makes your code formatted, and helps everyone answer your questions more easily!




    Wanna hear something funny?

    Me too.

Similar Threads

  1. Some legal questions about programming (intellectual property)
    By clydefrog in forum Totally Off Topic
    Replies: 13
    Last Post: April 6th, 2012, 11:08 AM
  2. How to test value in a property file?
    By KILL3RTACO in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: October 31st, 2011, 10:31 PM
  3. Spring - property not autowired
    By timothyd in forum Web Frameworks
    Replies: 0
    Last Post: September 7th, 2011, 07:04 AM
  4. 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
  5. JavaBean property TextPosition
    By stu1811 in forum Object Oriented Programming
    Replies: 4
    Last Post: August 26th, 2010, 09:33 AM