Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your application will load a collection of images and displays them in a photo a

ID: 3798897 • Letter: Y

Question

Your application will load a collection of images and displays them in a photo album layout.

The program will allow the user to tag images with metadata:

• Title for the photo. Limited to 100 characters.

• Description for the photo. Limited to 300 characters.

• Date taken

• Place taken Functional Specification

1. Your album should be able to display the pictures sorted by Title, Date, and Place.

2. When the user clicks on a photo, the metadata should be displayed.

3. The user should be able to add or remove photos from the album

I have looked up a number of different solutions from previous questions and none of them are complete programs.

Explanation / Answer

While Observing your question I did not get a clarity for which language either like java, Android.

So, I thought like let me do it in java itself.

An answer for the problem description is as follows:

Read an image from the local filesystem, create a BufferedImage from that image file, create an ImageIcon from that image, place that ImageIcon on a JLabel, and finally show the image in a JFrame

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;


public class ImageDemo
{
public static void main(String[] args) throws Exception
{
new ImageDemo(args[0]);
}

public ImageDemo(final String filename) throws Exception
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
JFrame editorFrame = new JFrame("Image Demo");
editorFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  
BufferedImage image = null;
try
{
image = ImageIO.read(new File(filename));
}
catch (Exception e)
{
e.printStackTrace();
System.exit(1);
}
ImageIcon imageIcon = new ImageIcon(image);
JLabel jLabel = new JLabel();
jLabel.setIcon(imageIcon);//set the image
jLabel.setDisplayedMnemonic("An Image with beautiful graphics");//set the description
editorFrame.getContentPane().add(jLabel, BorderLayout.CENTER);

editorFrame.pack();
editorFrame.setLocationRelativeTo(null);
editorFrame.setVisible(true);
}
});
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote