transparent color

I'd like to create a transparent DefaultTreeCellRenderer. (only the background would be transparent, not the text).
Do you know how to make a transparent color.
stef5Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
heyhey_Connect With a Mentor Commented:
>> Do you know how to make a transparent color.
you don't need transparent color, you need transparent JComponent (that is TreeCellRenderer).
You probably need to add this line renderer.setOpaque(false) ...
if this does not work you'll probably have to extend DefaultTreeCellRenderer (make your own cell renderer ...)


" JComponent
 public void setOpaque(boolean isOpaque)
If true the components background will be filled with the background color. Otherwise, the background is transparent, and whatever is underneath will show through. "

hope this helps
  heyhey



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.