Hi, I am creating a GUI for my java term project. This GUI is supposed to represent a database of students and teachers, and an user can edit this database if they would like. I have been taking my java class for 5 months now, but I have been doing extremely bad in it, and I barely understand any of it, so please excuse me if my question seem obvious.
GUi question:
1). After a long time I have been able to create three buttons, which represent teacher, student and other staff. I equipped each button with a button listener, but I need to open another GUI box which will allow the user selected people to be edited. For instance, if the user presses on the teacher, I want to open another box where the user can enter the teacher's name, address, experience etc. I don't really know what to do after this. I don't know what I have to do to open another GUI box, for adding/deleting people from the database.
2). Which brings me to my second method question. I am really confused as to what my method should be for adding/deleting a teacher. But I thought that I should create a method which returns an ArrayList<String>. This is what i have so far, but I think it is TOTALLY wrong:
Any constructive criticism and help is welcomed. If you can help, I will be in your favor.public ArrayList<String> addTeacher (String name, String address, String classes, String department, int years, int salary) { ArrayList<String> teacherList = new ArrayList<String>(); teacherList.add(new String (name + address + classes+ department + years + salary)); return teacherList; }