@Override public void paintDeterminate(Graphics g, JComponent c) {
	    if (!(g instanceof Graphics2D)) {
	      return;
	    }
	    Insets b = progressBar.getInsets(); // area for border
	    int barRectWidth  = progressBar.getWidth()  - (b.right + b.left);
	    int barRectHeight = progressBar.getHeight() - (b.top + b.bottom);
	    if (barRectWidth <= 0 || barRectHeight <= 0) {
	      return;
	    }
	    // amount of progress to draw
	    int amountFull = getAmountFull(b, barRectWidth, barRectHeight);

	    if(progressBar.getOrientation() == JProgressBar.HORIZONTAL) {
	      // draw the cells
	     // float x = amountFull / (float)barRectWidth;
	      g.setColor(getColorFromPallet(pallet, 1));
	      g.fillRect(b.left, b.top, amountFull, barRectHeight);
	      g.setColor(getColorFromPallet(pallet, 0));	     
	      g.fillRect(b.left+amountFull, b.top,  progressBar.getWidth()-amountFull, barRectHeight);
	    } else { // VERTICAL
	      //...
	    }
	    // Deal with possible text painting
	    if(progressBar.isStringPainted()) {
	      paintString(g, b.left, b.top, barRectWidth, barRectHeight, amountFull, b);
	    }
	  }