¡@

Home 

java Programming Glossary: g2.setcolor

Threads with Key Bindings

http://stackoverflow.com/questions/13999506/threads-with-key-bindings

img.createGraphics switch color.toLowerCase case green g2.setColor Color.GREEN break case magenta g2.setColor Color.MAGENTA .. case green g2.setColor Color.GREEN break case magenta g2.setColor Color.MAGENTA break case red g2.setColor Color.RED break.. case magenta g2.setColor Color.MAGENTA break case red g2.setColor Color.RED break case yellow g2.setColor Color.YELLOW break..

Java, how to draw constantly changing graphics

http://stackoverflow.com/questions/3742731/java-how-to-draw-constantly-changing-graphics

on event dispatch thread final Graphics2D g2 Graphics2D g g2.setColor getBackground try for int x 0 x 8 x for int y 0 y 8 y g2.setColor.. getBackground try for int x 0 x 8 x for int y 0 y 8 y g2.setColor model x y Ellipse2D e new Ellipse2D.Double 40 x STEP 45 y STEP.. 40 x STEP 45 y STEP STEP 3 STEP 3 g2.fill e g2.setColor Color.GRAY g2.draw e catch Exception e e.printStackTrace..

Drawing rectangle on a JPanel

http://stackoverflow.com/questions/9258890/drawing-rectangle-on-a-jpanel

g2.getClipBounds if shape.selectedcolor red g2.setColor Color.red else if shape.selectedcolor blue g2.setColor Color.BLUE.. g2.setColor Color.red else if shape.selectedcolor blue g2.setColor Color.BLUE else if shape.selectedcolor yellow g2.setColor.. Color.BLUE else if shape.selectedcolor yellow g2.setColor Color.yellow g2.setColor Color.RED g2.fillRect 0 0 w h else..