public ImageColorDialog(Image i) { this(); image = i; PixelGrabber pg = new PixelGrabber(i,0,0,-1,-1,true);  try { pg.grabPixels(); } catch (InterruptedException e) { e.printStackTrace(); }  pixels = (int[])pg.getPixels();  init(); pack(); setLocationRelativeTo(getOwner()); setModal(true);
public ImageColorDialog() { super();
	public ImageColorDialog(Image i) {		this();		image = i;		PixelGrabber pg = new PixelGrabber(i,0,0,-1,-1,true);				try {			pg.grabPixels();		} catch (InterruptedException e) {			e.printStackTrace();		} 			pixels = (int[])pg.getPixels();				init();		pack();		setLocationRelativeTo(getOwner());		setModal(true);	}