I am making a text-based game where the user inputs text to solve the game. I decided to use java swing to display the text, and I want to have the background of the textPane to
You may have an issue with Nimbus not respecting the background color settings. Try this to override the color:
JEditorPane area = new JEditorPane();
Color bgColor = Color.BLACK;
UIDefaults defaults = new UIDefaults();
defaults.put("EditorPane[Enabled].backgroundPainter", bgColor);
area.putClientProperty("Nimbus.Overrides", defaults);
area.putClientProperty("Nimbus.Overrides.InheritDefaults", true);
area.setBackground(bgColor);