private void paintBox(Graphics g,JComponent c){
  int w=c.getWidth();
  int h=c.getHeight() - 1;
  if (w <= 0 || h <= 0) {
    return;
  }
  Graphics2D g2=(Graphics2D)g;
  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  if (c.isEnabled()) {
    if (Boolean.parseBoolean(String.valueOf(c.getClientProperty(RapidLookTools.PROPERTY_INPUT_BACKGROUND_DARK)))) {
      g2.setColor(Colors.COMBOBOX_BACKGROUND_DARK);
    }
 else {
      g2.setColor(Colors.COMBOBOX_BACKGROUND);
    }
  }
 else {
    g2.setColor(Colors.COMBOBOX_BACKGROUND_DISABLED);
  }
  g2.fillRoundRect(0,0,w - 1,h,RapidLookAndFeel.CORNER_DEFAULT_RADIUS,RapidLookAndFeel.CORNER_DEFAULT_RADIUS);
  int ny=c.getSize().height / 2 - 3;
  int nx=c.getWidth() - 15;
  if (isDown && c.isEnabled()) {
    nx++;
    ny++;
  }
  g2.translate(nx,ny);
  if (c.isEnabled()) {
    g2.setColor(Colors.COMBOBOX_ARROW);
  }
 else {
    g2.setColor(Colors.COMBOBOX_ARROW_DISABLED);
  }
  w=14;
  Polygon arrow=new Polygon(new int[]{0,4,8},new int[]{0,6,0},3);
  g2.fillPolygon(arrow);
  g2.translate(-nx,-ny);
}

private void paintBox ( Graphics g , JComponent c ) { int w = c . getWidth ( ) ; int h = c . getHeight ( ) - 1 ; if ( w <= 0 || h <= 0 ) { return ; } Graphics2D g2 = ( Graphics2D ) g ; g2 . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; if ( c . isEnabled ( ) ) { if ( Boolean . parseBoolean ( String . valueOf ( c . getClientProperty ( RapidLookTools . PROPERTY_INPUT_BACKGROUND_DARK ) ) ) ) { g2 . setColor ( Colors . COMBOBOX_BACKGROUND_DARK ) ; } else { g2 . setColor ( Colors . COMBOBOX_BACKGROUND ) ; } } else { g2 . setColor ( Colors . COMBOBOX_BACKGROUND_DISABLED ) ; } g2 . fillRoundRect ( 0 , 0 , w - 1 , h , RapidLookAndFeel . CORNER_DEFAULT_RADIUS , RapidLookAndFeel . CORNER_DEFAULT_RADIUS ) ; int ny = c . getSize ( ) . height / 2 - 3 ; int nx = c . getWidth ( ) - 15 ; if ( isDown && c . isEnabled ( ) ) { nx ++ ; ny ++ ; } g2 . translate ( nx , ny ) ; if ( c . isEnabled ( ) ) { g2 . setColor ( Colors . COMBOBOX_ARROW ) ; } else { g2 . setColor ( Colors . COMBOBOX_ARROW_DISABLED ) ; } w = 14 ; Polygon arrow = new Polygon ( new int [ ] { 0 , 4 , 8 } , new int [ ] { 0 , 6 , 0 } , 3 ) ; g2 . fillPolygon ( arrow ) ; g2 . translate ( - nx , - ny ) ; }
draws the combobox itself .
