I'm trying to set the background color of all instances of a PanelGen class through a static method so that another class can change the color of all Panels at once.
An example of this would be:
PanelGen a = new PanelGen(Color.red);
PanelGen b = new PanelGen(Color.blue);
Then in the PanelGen class: public static void changeColor(Color newColor) { //Do something that changes the color of both a and b }
This way, an outside class such as "GameMaster" can change the color of both a and b
PanelGen.changeColor(Color.Orange);