Hi guys,


if(IsColor.equals("Y"))
	cell.setBackgroundColor(new Color(240,240,255));
table.addCell(cell);

This cell.setBackgroundColor(new Color(240,240,255)); is for set back ground color as a blue. I need Green color. So, is there any values for green. Please contribute your advice...


Recommended Answers

All 2 Replies

Look at the API for Color. What are those int values in that statement?

Now, what do you think you might try if you want Green?

In any case, see the Class JColorChooser, and then Google for the JColorChooser demo and run it.

do this

cell.setBackgroundColor(Color.GREEN);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.