Since swing doesn’t use traditional mvc where would you put the database interaction code?
You can follow the MVC pattern yourself, if you prefer. It’s not a super-complicated pattern and mostly just involves starting with three different packages and classes, and then just calling methods between them.
I know but I’d rather use the same pattern as swing
Well, I’m not aware of it encouraging or enforcing any such pattern. I’m certainly not an expert in Swing, but I was shortly taught about it in university (where I think, they taught MVC pattern alongside) and I built a mid-sized application with it, using the MVC pattern.
Of course you can use MVC with Swing. Swing itself doesn’t “use” anything, but it can be used to create the “View” in MVC.