0

today I have a problem to configure a text in a JLabel using a JButton.

When I do that the JPanel components disappear along with the JPanel

Below I show a gif of what happens

https://i.gyazo.com/b57c0e7617e365d8d47727f1dfb5deaf.gif

This is the code of the change button

public void buttonChangeLastname(){
    if(!varModeUser.jtxtLastname.isEnabled()){
        this.varModeUser.jtxtLastname.setEnabled(true);
        if(CreateFile.getInstance().getLanguaje().equalsIgnoreCase("ES")){
            this.varModeUser.jlAttention1.setText("Atención: Modo de cambio activado, para desactivarlo haga click de nuevo en el botón.");
        }else if(CreateFile.getInstance().getLanguaje().equalsIgnoreCase("EN")){
            this.varModeUser.jlAttention1.setText("Attention: Edit mode activated, to deactivate it, click the button again.");
        }
    }else{
        this.varModeUser.jtxtLastname.setEnabled(false);
    }
}

Help me please, I don't have idea how to continue :(

Sorry for my english, it's basic

0 Answers0