Right now, the background that I am getting is gray. I want to change it to black. I tried to do something like setBackground (color.BLACK); but it didn’t work. Any suggestions?
public test() { setTitle("Adjustment Form"); setSize(670,450); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLocationRelativeTo(null); setLayout(new GridLayout(4,6,2,2)); setVisible(true); }
java background-color
razshan
source share