I'm fairly new to the programming and I am still facing difficulties with OOP based concepts. I am trying to build a small standalone swing application with some database functions. I would be thankful for any kind of pointers and I appreciate any discussion on topic.
What I have so far:
I had in mind that I would create Database class what is responsible for starting my hsql server & making connection to it. Then I thought I would create a separate class where I do all the writing and reading from. Am I going towards the right direction? I've read about MVC design pattern but I can't apply it here can I?
I tried to play around with private static Connection connection object. I thought that when I make it static there would be only one of those. So I could pass that to different class and in such way I can accomplish doing writing / reading from separate class. Ended up with
Server@8813f2]: [Thread[HSQLDB Server @8813f2,5,main]]: run()/openServerSocket():
java.net.BindException: Address already in use: JVM_Bind