This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i was making a jcomponent and inside it i drew a rectangle . i wanted to set the background color of the JComponent as red or anything but when i write setBackground(Color.red) and execute the code the color is not set . Can somebody explain why ? My hunch is that it has something to do with the opaque property . Please expalin. here's the code