swing - Java: How can I load an external class into a gui -


I am looking for a specific functionality I want to load a square that is for example JPanel < / Code> and shows the zpnil on a different GUI class.

I'm looking for the ability to switch many of these classes on desires I have an idea for an educational game software and classes will be different games.

I realize that I can institute an example of each class in my GUI class, but I went to their point of view when I try to switch between them and not properly displayed Re-coloring () works only in the previous class that I had added to my content pane, certainly not why many sections are currently present, this is just pre Rti seems to ignore sections.

How to swap components

You can either switch all components Or you can use CardLayout to add / remove them

  container.revalidate (); Container.repaint ();    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -