Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

CS-250 Software Development Lifecycle – 3-3 Assignment Developing Basic ListView Control, SNHU (2026)

Document preview thumbnail
Preview 1 out of 3 pages

This document contains the CS-250 Software Development Lifecycle 3-3 assignment from Southern New Hampshire University, focused on developing a basic ListView control using Java Swing. It demonstrates the use of JList, custom list cell renderers, images, and GUI layout management to display a top five destination list with text and icons. The assignment showcases foundational GUI programming concepts aligned with object-oriented design and event-driven development.

Content preview

import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;

public class TopFiveDestinationList {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
TopDestinationListFrame topDestinationListFrame = new
TopDestinationListFrame();
topDestinationListFrame.setTitle("Top 5 Destination List");
topDestinationListFrame.setVisible(true);
}
});
}
}


class TopDestinationListFrame extends JFrame {
private DefaultListModel listModel;

public TopDestinationListFrame() {
super("Top Five Destination List");

setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setSize(900, 750);

listModel = new DefaultListModel();


//Make updates to your top 5 list below. Import the new image files to
resources directory.
addDestinationNameAndPicture("1. Paris. Paris offers iconic landmarks,
romantic scenery, and world class art that make it one of the most visited cities
in the world", new ImageIcon(getClass().getResource("/resources/paris.jpg")));
addDestinationNameAndPicture("2. Tokyo. Blends ancient traditions with
futuristic technology, offering vibrant nightlife,cuisine, and culture", new
ImageIcon(getClass().getResource("/resources/tokyo.jpg")));
addDestinationNameAndPicture("3. New York. A global hub of entertainmet,
culture, and skycrappers, attracting millions of visitors each year", new
ImageIcon(getClass().getResource("/resources/newyork.jpg")));
addDestinationNameAndPicture("4. Dubai. It features stunning modern
architecture and luxury attractions, including the world famous Burj Khalifa", new
ImageIcon(getClass().getResource("/resources/dubai.jpg")));
addDestinationNameAndPicture("5. Capetown. It is a known for its
breathtaking landscapes, beaches, and iconic Table mountain", new
ImageIcon(getClass().getResource("/resources/capetown.jpg")));

JList list = new JList(listModel);
JScrollPane scrollPane = new JScrollPane(list);

TextAndIconListCellRenderer renderer = new TextAndIconListCellRenderer(2);

list.setCellRenderer(renderer);

getContentPane().add(scrollPane, BorderLayout.CENTER);
}

private void addDestinationNameAndPicture(String text, Icon icon) {

Document information

Uploaded on
January 18, 2026
Number of pages
3
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TestbanksNerd
3.4
(18)
Sold
168
Followers
1
Items
460
Last sold
3 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions