Пример #1
0
 public void drawInfoBox(Graphics2D g2d, InfoBox n) {
   g2d.setColor(n.getBackColor());
   g2d.fill(new Rectangle2D.Float(n.x, n.y, n.width, n.height));
   g2d.setColor(n.getTextColor());
   for (int i = 0; i < n.text.length; i++) {
     g2d.drawString(n.text[i], n.x + 2, n.y + 12 + (12 * i));
   }
   g2d.setColor(Color.GRAY);
   g2d.drawRect(n.x, n.y, n.width, n.height);
 }