java - How can I make multiple instances of the same panel and change attributes in each one individually? -


is possible make jpanel, put variables inside of it, , add same panel content pane multiples times( number of times based on number of variable outside of gui). , edit content inside of each instance individually?

here why need things mentioned above: i'm writing program several different clinics can use minimum setup on user side. specify how many bedrooms have , program creates visual representation of each bedroom automatically. example: clinic has 13 rooms program adds 13 bedroom jpanels content pane , displays them in numerical order using fullscreen view.

no, can't this. each jcomponent (which includes jpanel can have 1 , 1 parent).

you "fake" using jtable , having panel cell renderer table, works if have no interactive controls inside panel though.

what need either create factory generates these jpanels you need them , create number need or create new subclass of jpanel has set , add new instances of that.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -