imagePainter = new ImagePainter( context, g, x, y, w, h, imagePath, sourceInsets, destInsets, true, true, true );
painters.put( imagePath, imagePainter );
}
Icon arrow = new ImageIcon( imagePainter.getImage( imagePath ));
BasicMenuUI ui = ( BasicMenuUI ) ( ( JMenu ) context.getComponent() ).getUI();
Class clazz = Class.forName( "javax.swing.plaf.basic.BasicMenuItemUI" );
Field field = clazz.getDeclaredField( "arrowIcon" );
field.setAccessible( true );
field.set( ui, arrow );
}