Monday, March 2, 2009

Changing the background color of the JPanel using JAVA

Allows user change the color of the panel or JPanel in this program using JFrame and 3 buttons.














































You can download my example below.


Download File

3 comments:

  1. This Java code is helping a lot but I have doubt that in swing do we have any option such as if be added the background and now want to remove that.. do we have any solution for this..??

    ReplyDelete
    Replies
    1. You could use a color object as the parameter for the JPanel.setBackground() method. When ever you change the color of the Color object so will the background of the panel. :)

      Delete
  2. Thank you for this tut. :) Though I wish you had more info written in this post. Some people might find it helpful.

    ReplyDelete

 

blogger templates | Make Money Online