first of all there is no such method. :)
You can try:
frame.setBackground(Color.CYAN);
frame.setContentPane(null);
but I'm not sure if You'll not get NPE. Basically What You were doing was:
1) setting frames Background;
2) filling the frame with content pane having it's own background and being opaque