java Programming Glossary: g2.fillrect
JList with categories http://stackoverflow.com/questions/10298360/jlist-with-categories g2.setPaint getBackground g2.fillRect 0 0 w h int x 2 w 2 18 int y 4 15 4 Polygon p new Polygon x.. g2.setPaint getBackground g2.fillRect 0 0 w h x new int 3 13 3 y new int 4 h 2 16 p new Polygon x..
Program to create a PNG waveform for an audio file http://stackoverflow.com/questions/11017283/program-to-create-a-png-waveform-for-an-audio-file g2.clearRect 0 0 w h g2.setColor Color.white g2.fillRect 0 h INFOPAD w INFOPAD if errStr null g2.setColor jfcBlue g2.setFont..
Java rectangle collision detection confusion http://stackoverflow.com/questions/13825515/java-rectangle-collision-detection-confusion Graphics2D g2 img.createGraphics g2.setColor Color.WHITE g2.fillRect 0 0 img.getWidth img.getHeight return img private BufferedImage.. Graphics2D g2 img.createGraphics g2.setColor Color.BLACK g2.fillRect 0 0 img.getWidth img.getHeight return img class Entity extends..
Threads with Key Bindings http://stackoverflow.com/questions/13999506/threads-with-key-bindings default g2.setColor Color.WHITE break if circular g2.fillRect 0 0 img.getWidth img.getHeight else g2.fillOval 0 0 img.getWidth..
Pacman open/close mouth animation http://stackoverflow.com/questions/14426693/pacman-open-close-mouth-animation Graphics2D g2 bi.createGraphics g2.setColor color g2.fillRect 0 0 int size int size AffineTransform rotate AffineTransform.getRotateInstance..
Border with rounded corners & transparency http://stackoverflow.com/questions/15025092/border-with-rounded-corners-transparency area g2.setClip borderRegion g2.setColor bg g2.fillRect 0 0 width height g2.setClip null g2.setColor color g2.setStroke..
MouseListener Help Java http://stackoverflow.com/questions/5136859/mouselistener-help-java z 15 g2.drawRect w 10 x 30 y z g2.drawRect w 10 x 30 y z g2.fillRect w 10 x 30 y z g2.setPaint c public static void main String..
How to add sexy on/off sliders? http://stackoverflow.com/questions/7304017/how-to-add-sexy-on-off-sliders GradientPaint x int y 0.1 h colorDark x int y 1.2 h light g2.fillRect x y w h g2.setPaint new GradientPaint x int y .65 h light x.. GradientPaint x int y .65 h light x int y 1.3 h colorDark g2.fillRect x int y .65 h w int h .65 h if w 14 int size 10 g2.setColor.. h .65 h if w 14 int size 10 g2.setColor colorBright g2.fillRect x w 2 size 2 y h 2 size 2 size size g2.setColor new Color 120..
JTable how to change BackGround Color http://stackoverflow.com/questions/8197261/jtable-how-to-change-background-color g2 shadow.createGraphics g2.setPaint new Color 250 150 150 g2.fillRect 0 0 1 h g2.setComposite AlphaComposite.DstIn g2.setPaint new.. 0 0 new Color 0 0 0 0f 0 h new Color 0.5f 0.8f 0.8f 0.5f g2.fillRect 0 0 1 h g2.dispose @Override public void paint Graphics g if.. Graphics2D g2 shadow.createGraphics g2.setPaint color g2.fillRect 0 0 1 h g2.setComposite AlphaComposite.DstIn g2.setPaint new..
Passing current Date http://stackoverflow.com/questions/8614972/passing-current-date g Graphics2D g2 shadow.createGraphics g2.setPaint g g2.fillRect 0 0 1 h g2.setComposite AlphaComposite.DstIn g2.setPaint new.. 0 0 new Color 0 0 0 0f 0 h new Color 0.8f 0.8f 0.8f 0.5f g2.fillRect 0 0 1 h g2.dispose @Override public void paint Graphics g ..
Drawing rectangle on a JPanel http://stackoverflow.com/questions/9258890/drawing-rectangle-on-a-jpanel yellow g2.setColor Color.yellow g2.setColor Color.RED g2.fillRect 0 0 w h else if clipfurther Rectangle r new Rectangle w 4.. if shape.selectedcolor yellow g2.setColor Color.yellow g2.fillRect 0 0 w h class RadioListener implements ActionListener public..
|