I am trying to create a simple button which should look like this-
JButton connectBtn = new JButton("Connect");
Color blue = new Color(77,176,230);
connectBtn.setBackground(blue);
But the problem is the background blue color is not as dark as it should look.
I have tried all the below possibilities,but of no use:-(
connectBtn.setBackground(Color.blue);
connectBtn.setBackground(Color.BLUE.brighter());
connectBtn.setBackground(Color.decode("#0099cc"));//i tried simply #0099cc just to get any dark background
Kindly help me in setting this color to JButton background. Thanks.
PrintScreen -> Paint -> Colorpicker tells me that the color of your button is
1691D9
or
(22,145,217)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.