BACKGROUND
I'm creating a hostel booking software as a project to learn java. I have my main frame which holds buttons that open each room by setting the containing frame to visible. I have an add room button that asks me how many beds the room as and stores this as an int.
QUESTION
Would it be possible to have a room class that would allow me to create new rooms by pressing the button? That means creating an InternalFrame, JPanel and JButtons, adding the buttons to a grid based off the bed number int.
I feel like the idea is there but the implementation is proving tricky since im new to java. Any ideas are appreciated, thanks!