0

I have a problem.

When I click on the "Blue Theme" button, the jFrame1 passes a text for a jTextField the jFrame2. But.... when the jFrame2 open, AUTOMATICALLY the theme must change. For this I made a simple condition in

initComponents();

jTextField receive the text without problems, but the theme doesn't change. Here's my code

public Frame2() {
    initComponents();
    if("Blue".equals(ReceiveColor.getText())){
        jPanel1.setBackground(Color.blue);
    }else{

    }
}

Any idea on how to solve that problem? Thanks in advance!

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Matheus Cirillo
  • 133
  • 2
  • 9

0 Answers0