private void imageFileChooser() {
		JFileChooser fileChooser = new JFileChooser();
		fileChooser.setDialogTitle("Open a file");
		fileChooser.addChoosableFileFilter(new ExtensionFileDialogFilter("jpg"));

		int returnVal = fileChooser.showOpenDialog(this);

		if (returnVal == JFileChooser.APPROVE_OPTION) {
			file = fileChooser.getSelectedFile();

			try {
				inputImage = ImageIO.read(file);
				resultImage = ImageIO.read(file);
				imagePanelOriginal.setImage(inputImage);
				imagePanelProcessed.setImage(resultImage);

				// ---------------------------
				frameOriginal = new JInternalFrame("Original Image", true, true, true, true);
				frameOriginal.add(imagePanelOriginal, BorderLayout.CENTER);
				frameOriginal.pack();
				theDesktop.add(frameOriginal);
				frameOriginal.setVisible(true);

				frameProcessed = new JInternalFrame("Processed Image", true, true, true, true);
				frameProcessed.add(imagePanelProcessed, BorderLayout.CENTER);
				frameProcessed.pack();
				theDesktop.add(frameProcessed);

				textPanelResult = new JTextPane();
				sdoc = textPanelResult.getStyledDocument();

				textProcessed = new JInternalFrame("Processed Image", true, true, true, true);
				textProcessed.add(textPanelResult, BorderLayout.CENTER);
				textProcessed.pack();
				theDesktop.add(textProcessed);

				scrollPane = new JScrollPane(textPanelResult);
				BufferedImage bufImg = ImageProcessor.convert(inputImage);
				scrollPane.setPreferredSize(new Dimension(bufImg.getWidth(), bufImg.getHeight()));
				textProcessed.add(scrollPane, BorderLayout.CENTER);
				textProcessed.pack();

				JInternalFrame[] frames = theDesktop.getAllFrames();
				int x = 10;
				int y = 10;
				for (int i = frames.length - 1; i >= 0; i--) {
					frames[i].setLocation(x, y);
					x += 30;
					y += 30;
				}

				getContentPane().add(theDesktop);
				// ---------------------------

				imageBuffer = new Vector();
				imageBuffer.add(inputImage);
				messageBuffer = new Vector();
				curImageIndex = 0;
				menuItemSave.setEnabled(true);
				menuItemUndo.setEnabled(true);
				menuItemRedo.setEnabled(true);
				menuItemBokehTest.setEnabled(true);
				menuItemGaussianFilterForGoogleCamera.setEnabled(true);
				menuItemGetDepthMapFromGoogleCamera.setEnabled(true);
				menuItemGaussianFilter.setEnabled(true);
				menuItemLensBlurFilter.setEnabled(true);
				menuItemGrayscale.setEnabled(true);
				menuItemInvert.setEnabled(true);
				menuItemBrightness.setEnabled(true);
				menuItemPreservingPartColor.setEnabled(true);
				menuItemRandomPixelMovement.setEnabled(true);
				menuItemSpinning.setEnabled(true);
				menuItemPinching.setEnabled(true);
				menuItemPixelate.setEnabled(true);
				menuItemConvertToASCII.setEnabled(true);

				infoBar.setText(" Info.: Filename = " + file.getName() + ", Image's size = " + inputImage.getWidth() + " x "
				        + inputImage.getHeight());
				messageBuffer.add(infoBar.getText());

				menuProcessing.setEnabled(true);
			} catch (IOException e) {
			}
		}
	}