This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have my panel as a rectangle with some data on it. When I point my mouse over that, I should get the color of that panel changed (say a light green color). But, still I need the data present on it visible. How could I achieve this ?
Thanks in advance, Narendranath
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Depends on what you're doing. If the data is simple text you can put it on a JLabel and add the JLabel to the JPanel. Add a MouseListener to the JLabel and change the background color of the JPanel in the mouseEntered and mouseExited methods.