question: private void renderImage ( ) { BufferedImage bgImage = segmentImages [ 0 ] [ 0 ] ; int w = bgImage . getWidth ( ) ; int h = bgImage . getHeight ( ) ; BufferedImage result = new BufferedImage ( w , h , BufferedImage . TYPE_INT_ARGB ) ; Graphics g = result . getGraphics ( ) ; g . drawImage ( bgImage , 0 , 0 , null ) ; int byteNumber = 0 ; for ( byte bValue : manualValues ) { if ( byteNumber > 0 && byteNumber < 14 ) { for ( int bitNumber = 0 ; bitNumber < 8 ; bitNumber ++ ) { if ( Format . isBitSet ( bValue , bitNumber ) ) { BufferedImage img = segmentImages [ byteNumber ] [ bitNumber ] ; if ( img != null ) { g . drawImage ( img , 0 , 0 , null ) ; } } } } byteNumber += 1 ; } imagePanel . setImage ( result ) ; imagePanel . repaint ( ) ; }
target:  Render manualValues array to image