I am in the middle of developing a Java application for one of my classes and have come across what is turning out to be quite the obstacle to overcome...
My application allows a student to keep track of their class grades, for multiple classes which are selected from a master list stored in an Access db. I want to allow the student to add courses to and delete them from the db...so far i seem to be in good shape. My connections are fine, my queries are fine, the GUI interface is operational, and I can read and write to and from my db...kinda. The problem I'm running into is that through using a JDesktopPane and multiple JInternalFrames, whenever I make changes to the db using one form, I cannot see those changes where I should be able to in another. In fact, they are not pulling any information from my db at all. The only way I can see my updates through those forms is if I restart the application entirely (which is baaaaad).
In class, our instructor briefly introduced us to the 'Observable / Observer' relationships that can exist between the different elements of an MVC pattern. From what I understand I have the classes created in a fashion that uses MVC (a dataModel, forms for the interface, and controls that are looseley defined in each...which is where I'm most likely having problems!). If anyone could point me in a direction where I could see a code example of how to successfully implement a simple Observable / Observer relationship using JDBC, I would be very appreciative!
Thanks in advance,
7th Semester CIS student
DeVry University | Orlando, FL