public static void main(String args[]) throws Exception { JFrame ventana = new JFrame("Image"); // int k=5; String n; int c[] = new int[9]; n = "C:\\BORLANDC\\BIN\\CIMG1098.jpg"; // n[1]="C:\\BORLANDC\\BIN\\sd"; ventana.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent evt) { System.exit(0); } }); ventana.getContentPane().add(new erosion(n), BorderLayout.CENTER); ventana.setSize(1000, 1000); ventana.setVisible(true); /* ventana.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent evt ){ System.exit( 0 ); } } ); ventana.getContentPane().add( new GetImage(),BorderLayout.CENTER ); ventana.setSize( 500,500 ); ventana.setVisible( true ); /* GetImage image = new GetImage(); image.setSize(400, 340); image.setVisible(true); image.setLocation(200, 100);*/ }