set background color: Android

instead of #rrggbb you should be using hex values 0 to F for rr, gg and bb: e.g. Color.parseColor(“#000000”) or Color.parseColor(“#FFFFFF”) Source From documentation: public static int parseColor (String colorString): Parse the color string, and return the corresponding color-int. If the string cannot be parsed, throws an IllegalArgumentException exception. Supported formats are: #RRGGBB #AARRGGBB ‘red’, ‘blue’, ‘green’, ‘black’, ‘white’, ‘gray’, … Read more

set background color: Android

instead of #rrggbb you should be using hex values 0 to F for rr, gg and bb: e.g. Color.parseColor(“#000000”) or Color.parseColor(“#FFFFFF”) Source From documentation: public static int parseColor (String colorString): Parse the color string, and return the corresponding color-int. If the string cannot be parsed, throws an IllegalArgumentException exception. Supported formats are: #RRGGBB #AARRGGBB ‘red’, … Read more

Setting background images in JFrame

There is no built-in method, but there are several ways to do it. The most straightforward way that I can think of at the moment is: Create a subclass of JComponent. Override the paintComponent(Graphics g) method to paint the image that you want to display. Set the content pane of the JFrame to be this subclass. Some sample code: Note that … Read more

Adding image to JFrame

There is no specialized image component provided in Swing (which is sad in my opinion). So, there are a few options: As @Reimeus said: Use a JLabel with an icon. Create in the window builder a JPanel, that will represent the location of the image. Then add your own custom image component to the JPanel … Read more

SVG transparent background web

transparent is not part of the SVG specification, although many UAs such as Firefox do support it anyway. The SVG way would be to set the stroke to none, or alternatively set the stroke-opacity to 0. You also don’t set any value for fill on the <rect> element and the default is black. For a … Read more