• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 3 páginas
Examen

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

Document preview thumbnail
Vista previa 1 fuera de 3 páginas

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.

Vista previa del contenido

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) {

Información del documento

Subido en
18 de enero de 2026
Número de páginas
3
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$10.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
TestbanksNerd
3.0
(21)
Vendido
212
Seguidores
1
Artículos
446
Última venta
1 semana hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes