java Programming Glossary: g.fillrect
Dynamic Graphics Object Painting In Java http://stackoverflow.com/questions/10628492/dynamic-graphics-object-painting-in-java Graphics g surface.getGraphics g.setColor Color.ORANGE g.fillRect 0 0 600 400 g.setColor Color.BLACK Keep this until I figured..
JLabel images array http://stackoverflow.com/questions/11553461/jlabel-images-array Graphics g img.getGraphics g.setColor color g.fillRect 0 0 width width g.dispose return new ImageIcon img public int..
Drawing a rectangle that won't disappear in next paint http://stackoverflow.com/questions/12683533/drawing-a-rectangle-that-wont-disappear-in-next-paint @Override public void paint Graphics g g.setColor c g.fillRect x y size size java swing graphics jpanel paint share improve..
Threads with Key Bindings http://stackoverflow.com/questions/13999506/threads-with-key-bindings public void paint Graphics g g.setColor Color.BLACK g.fillRect x y PADDLE_WIDTH PADDLE_HEIGHT Feel free to comment on my design..
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 Area..
GUI not working after rewriting to MVC http://stackoverflow.com/questions/3066590/gui-not-working-after-rewriting-to-mvc void paint Graphics g g.setColor new Color 238 238 238 g.fillRect 0 0 400 590 for int i 0 i model.pins.length i paintPins model.pins..
Java - Transparent JScrollPane http://stackoverflow.com/questions/3517722/java-transparent-jscrollpane Graphics g super.paintComponent g g.setColor Color.blue g.fillRect TILE TILE 3 TILE 3 TILE private static class MyPanel extends.. row 0 row h row for int col 0 col w col if row col 2 0 g.fillRect col TILE row TILE TILE TILE public static void main String..
JFormattedTextField is not properly cleared http://stackoverflow.com/questions/4148336/jformattedtextfield-is-not-properly-cleared this.getBackground int dx1 w width height 4 int dx2 w dx1 g.fillRect dx1 0 dx2 dx1 h g.drawImage image dx1 0 dx2 h 0 0 width height..
How to add JTable in JPanel http://stackoverflow.com/questions/5621338/how-to-add-jtable-in-jpanel 20f 20f Color.red 180f 180f Color.yellow g.setPaint gp g.fillRect 0 0 200 200 ImageIcon ii new ImageIcon bi JLabel imageLabel..
JPanel repaint issue http://stackoverflow.com/questions/7213178/jpanel-repaint-issue aware that i can simply clear the display JPanel by using g.fillRect or super.paintComponent before doing my drawings. I am just..
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..
How to handle events from keyboard and mouse in full screen exclusive mode in java? http://stackoverflow.com/questions/7456227/how-to-handle-events-from-keyboard-and-mouse-in-full-screen-exclusive-mode-in-ja private void render Graphics2D g g.setColor Color.BLACK g.fillRect 0 0 bounds.width bounds.height public void start timer.start..
rotating coordinate plane for data and text in Java http://stackoverflow.com/questions/9371961/rotating-coordinate-plane-for-data-and-text-in-java fill then plot inner rectangle g.setColor Color.white g.fillRect leftStartPlotWindow blueTop blueWidth blueHeight g.setColor..
Something seems wrong with the layout, JButton showing unexpected behaviour at resize of the window http://stackoverflow.com/questions/9849950/something-seems-wrong-with-the-layout-jbutton-showing-unexpected-behaviour-at-r void paintComponent Graphics g g.setColor backgroundColor g.fillRect 0 0 getWidth getHeight g.setColor foregroundColor g.fillOval.. void paintComponent Graphics g g.setColor backgroundColor g.fillRect 0 0 getWidth getHeight g.setColor foregroundColor g.fillOval..
|