@Override
   public void paint(Graphics g) {
      if (isOpaque()) {
         g.setColor(getBackground());
         g.fillRect(0, 0, getWidth(), getHeight());
         g.setColor(getForeground());
      }
      boolean pattern[] = patterns[value > -1 && value < 10 ? value : 10];
      for (int ix = 0; ix < 7; ix++)
         if (pattern[ix]) g.fillPolygon(segments[ix]);
      if (flag) g.fillOval(dotx, flgy, dotw, doth);
      if (decimal) g.fillOval(dotx, decy, dotw, doth);
      if (colon) {
         g.fillOval(dotx, cl1y, dotw, doth);
         g.fillOval(dotx, cl2y, dotw, doth);
      }
      super.paint(g);
   }