I have problem while i'm reading images from gallery. If the count of images is less then 6 it works fine, but otherwise it thows exception. My code:
I'm doing something wrong?Code:for (int i = 0; i < paths.size(); i++) { //path is Vector of strings try { FileConnection fc = (FileConnection) Connector.open((String) paths.elementAt(i)); Image img = Image.createImage(fc.openInputStream()); fc.close(); //fc = null; //i have tried also this solution Image pi = createThumbnail(img); g.drawImage(pi, posX, posY, 0); } catch (IOException ex) { ex.printStackTrace(); } posX += 80; if (posX == 240) { posX = 0; posY += 130; } }

Reply With Quote


