0

Estoy haciendo un menú de login y quiero personalizarlo todo lo que pueda. El problema es que no encuentro cómo modificar los bordes alrededor de la ventana (los bordes color verde de Windows):

introducir la descripción de la imagen aquí

Con setUndecorated puedo simplemente eliminar eso, pero al minimizar la pantalla se genera un bug que pone visible muy brevemente los bordes que se supone deberían ocultarse con setUndecorated, y no me gusta.

public void configureProperties(int width, int height) {
    this.window.setUndecorated(true);
    this.window.setSize(width, height);
    this.window.setMinimumSize(new Dimension(width, height));
    this.window.setLocationRelativeTo(null);
    this.window.setDefaultCloseOperation(3);
}
1
  • Tienes el serVisible antes que la configuración de las propiedades de la ventana?
    – JFrame
    el 26 dic. 2022 a las 12:03

1 respuesta 1

0

Prueba estos métodos a ver si te ayudan:

dispose();
setUndecorated(true);
setVisible(true);

Tu código quedaría así:

public void configureProperties(int width, int height) {
    this.window.dispose();
    this.window.setUndecorated(true);
    this.window.setVisible(true);
    this.window.setSize(width, height);
    this.window.setMinimumSize(new Dimension(width, height));
    this.window.setLocationRelativeTo(null);
    this.window.setDefaultCloseOperation(3);
}

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.