Combobox is not working after setting transparency to background color of frame- rgba
Hi to all,
I created a frame and added a panel to the frame.
In that panel, I’ve added a background image and components like combobox, button, etc. In that background image, some extra white space is there. My requirement is to make the frame transparent, so that the extra white space will not be visible.
I’ve made that frame transparent by setting setBackground(new Color(255,255,255,0)) where the color parameters are red, green, blue, alpha.
Since the value of alpha is zero, the frame is transparent. But, if I click the combobox it is not dropping down the items and I can’t be able to select the items.
If there is no alpha parameter (i.e., setBackground(new Color(255,255,255))), then the combobox is dropping down fine and can be able to select the items. But the frame is not transparent.
If I make the frame transparent, other than the combobox all the components are working fine.
Re: Combobox is not working after setting transparency to background color of frame-
Why u want to make the combobox transparent by the way?
Re: Combobox is not working after setting transparency to background color of frame-
Re: Combobox is not working after setting transparency to background color of frame-
Quote:
Originally Posted by
kvv230892
Why u want to make the combobox transparent by the way?
I want to make the frame transparent but not the combobox!
jCbx.setBackground(new Color(238,238,238)); //To set the background color of the combobox
setBackground(new Color(255,255,255,0)); //To set the background color of the frame
My aim is that to make the background color of the frame as transparent and the background color of the combobox as opaque.
I tried like this also,
jCbx.setBackground(new Color(238,238,238,255)); //To set the background color of the combobox
setBackground(new Color(255,255,255,0)); //To set the background color of the frame
But,it didn't work:(