¡@

Home 

java Programming Glossary: rects

Drawing a rectangle that won't disappear in next paint

http://stackoverflow.com/questions/12683533/drawing-a-rectangle-that-wont-disappear-in-next-paint

roughly 25 frames a second . I got this up to a 1000 rects without any issue was able to resize the window without and..

paintComponent draws other components on top of my drawing

http://stackoverflow.com/questions/13358658/paintcomponent-draws-other-components-on-top-of-my-drawing

public PaintPanel addRect 100 100 ArrayList Rectangle rects new ArrayList @Override protected void paintComponent Graphics.. g2d Graphics2D g g2d.setPaintMode for Rectangle r rects g2d.setStroke new BasicStroke 1 g2d.fillRect r.x r.y r.width.. r.x r.y r.width r.height public void addRect int x int y rects.add new Rectangle x y 10 10 repaint @Override public Dimension..

Strange JFrame Behavior

http://stackoverflow.com/questions/13822019/strange-jframe-behavior

DrawPanel extends JPanel private ArrayList MyRectangle rects new ArrayList private Random rand new Random @Override public.. g super.paintComponent g addRect for MyRectangle r rects g.setColor r.getColor g.fillRect r.x r.y r.width r.height.. return new Dimension 500 500 public void clearRects rects.clear public void addRect following 4 lines make sure the..

How can I change the shape of a JTabbedPane tab?

http://stackoverflow.com/questions/7054466/how-can-i-change-the-shape-of-a-jtabbedpane-tab

lines new int runCount for int i 0 i runCount i lines i rects tabRuns i .y tabPlacement TOP maxTabHeight 0 Arrays.sort lines.. i 1 else carp.addPoint tabPane.getWidth 2 fila lines i rects selectedIndex .height carp.addPoint 0 lines i rects selectedIndex.. i rects selectedIndex .height carp.addPoint 0 lines i rects selectedIndex .height carp.addPoint 0 lines i g.setColor..