I think you need to give us some examples. What do you mean by "background?" Are you creating a GUI swing app? If so, then the assumption to use JPanel (or JFrame) makes sense. But you can create a GUI app with JavaFX if you are being more modern and you could use the java.awt package if you took some book out of the library from 1998.