Avatar of Gregg
Flag for United States of America

asked on 

Why are JLabels not transparent in my JList?

Any idea why the JLabels arent transparent?

My process:
1.Create a JPanel using GridBagLayout Manager. Add a few JLabels.
2. Add the JPanel to an object array.
3. Pass object array into JList (setListData() method)
4. Call the setCellRenderer(new JListRenderer()) method

And it displays on screen with gray bg. Where am i going wrong?

Any thoughts or suggestions are appreciated.

 Screenshot of non transparent JLabels.

Avatar of undefined
Last Comment

8/22/2022 - Mon