¡@

Home 

java Programming Glossary: g.fill

Get mouse detection with a dynamic shape

http://stackoverflow.com/questions/13795236/get-mouse-detection-with-a-dynamic-shape

Graphics2D g img.createGraphics g.setColor Color.WHITE g.fillRect 0 0 w h RenderingHints hints new RenderingHints RenderingHints.KEY_ANTIALIASING.. BasicStroke 4 for Ellipse2D shape shapes g.setColor bg g.fill shape if shape.contains mouse g.setColor inside else g.setColor..

Collision detection with complex shapes

http://stackoverflow.com/questions/14574045/collision-detection-with-complex-shapes

RenderingHints.VALUE_ANTIALIAS_ON g.setColor Color.BLUE g.fillRect 0 0 img.getWidth img.getHeight x xDelta y yDelta int s 15.. g.setColor Color.RED else g.setColor Color.GREEN g.fill obstacle g.setColor Color.YELLOW g.fill player g.dispose public.. Color.GREEN g.fill obstacle g.setColor Color.YELLOW g.fill player g.dispose public static void main String args Runnable..

'Fill' Unicode characters in labels

http://stackoverflow.com/questions/18686199/fill-unicode-characters-in-labels

if r1.getX 0.001 r1.getY 0.001 else g.setColor bgColor g.fill region g.setColor outlineColor g.fill shapeArea g.dispose.. bgColor g.fill region g.setColor outlineColor g.fill shapeArea g.dispose JLabel l new JLabel new ImageIcon bi JLabel.CENTER.. r1 region.getBounds if r1.getX 0.001 r1.getY 0.001 else g.fill region g.setColor outlineColor g.fill shapeArea g.dispose..

How do i align this text correctly?

http://stackoverflow.com/questions/6238037/how-do-i-align-this-text-correctly

Second second 1 s lastTime now Render g.setColor colors 0 g.fillRect 0 0 size size for int i 0 i vars.length i scale i float.. scale i float vars.length radius 1.7f g.setColor colors 0 g.fillOval int scale 2 int scale 2 int size scale int size scale g.setColor.. scale 2 size scale size scale 450 vars i vars i Arc2D.PIE g.fill arch g.setColor Color.WHITE radians vars i HPI vars i 90 scale..

Override Swing Nimbus L&F primary color per component instance

http://stackoverflow.com/questions/6922368/override-swing-nimbus-lf-primary-color-per-component-instance

Graphics2D g rect decodeRect1 g.setPaint color1 g.fill rect rect decodeRect2 g.setPaint decodeGradient1 rect g.fill.. rect rect decodeRect2 g.setPaint decodeGradient1 rect g.fill rect private void paintBackgroundDisabled Graphics2D g rect.. g rect decodeRect2 g.setPaint decodeGradient2 rect g.fill rect private void paintBackgroundEnabledAndMouseOver Graphics2D..

Smoothing a jagged path

http://stackoverflow.com/questions/7218309/smoothing-a-jagged-path

g imageOutline.createGraphics g.setColor Color.WHITE g.fillRect 0 0 imageOutline.getWidth imageOutline.getHeight g.setColor.. g.setColor Color.RED g.setClip areaOutline g.fillRect 0 0 imageOutline.getWidth imageOutline.getHeight g.setColor.. Graphics2D g outline.createGraphics g.setColor Color.WHITE g.fillRect 0 0 size size g.setRenderingHint RenderingHints.KEY_DITHERING..