En este momento, el fondo que obtengo es gris. Quiero cambiarlo a negro. Intenté hacer algo como setBackground (color.BLACK); pero no funcionó. ¿Alguna sugerencia?Cómo cambiar el color de fondo en un panel de Java?
public test()
{
setTitle("Adjustment Form");
setSize(670,450);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setLayout(new GridLayout(4,6,2,2));
setVisible(true);
}
Seguí adelante e hice el método getContentPane y funcionó. – razshan