Java - LinkedLists - Students GUI - Add, Delete, Display
@MoosesValley - Software development, SciFi, Doggies, Animal Rescues, Quad Bikes, and more
A recording of me building a Student GUI that stores Student objects in a LinkedList and allows the user to Add students, Delete students, Display All students, and Exit. See question below. Uses Java's built in LinkedList class.
Source code is here: https://github.com/MooseValley/LinkedLists-Students-GUI-Add-Delete-Display
User input is handled via GUI components (textfields) - which is much better than using input dialogs.
Q1. Linked Lists – using Java's built in LinkedList
- Write a Java class named StudentEmail that has data members for the name and number of a student. The class should have a constructor and appropriate accessor and mutator methods. In addition, the toString method should include the output information with student name, student number and the corresponding e-mail address. The e-mail address is a string with the student number and @my.email (such as s123@my.email). Then you write a program that creates a GUI with two labelled text fields, each one for name and student number, a text area to display the information, and four buttons: • Add: when the user enters data into the text fields and clicks the ‘add’ button, a StudentEmail object is created and stored in a LinkedList, and in then the student name, number and e-mail is displayed on the text area. • Delete: If you want to delete a student e-mail entry, you can enter the student name in the text field and press the ‘delete’ button. If the entered student name doesn’t match any name in the LinkedList, a dialog message box will pop up to indicate this. • Display All: Clicking ‘display all’ button will display all data (StudentEmail object) that are stored in the linkedlist. • Exit: Pressing ‘exit’ button will allow users to exit the program.
Source code is here: https://github.com/MooseValley/LinkedLists-Students-GUI-Add-Delete-Display
If you'd like to learn more about Linked Lists, see my 2 part special:
- LinkedList - From Scratch - Part 1 of 2: https://youtu.be/BuntNoC8Cq0
- LinkedList - From Scratch - Part 2 of 2 here: https://youtu.be/WdXKpOIEzoo
Moose's Software Valley - Established July, 1996. https://rebrand.ly/MoosesSoftware ... https://www.youtube.com/watch?v=0KdG9DZgi6I
145205748 Bytes