dialog.hide();
dialog.setVisible(false);
                public void keyPressed( KeyEvent event ) {                    if ( KeyEvent.VK_ENTER == event.getKeyCode() ) {                        camo.setBackground( color.getBackground() );                        camo.setLabel( color.getLabel() );                        camo.setImage( null );                        dialog.hide();                    }                }