Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • Last Modified:

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.
0
stef5
Asked:
stef5
1 Solution
 
heyhey_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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now