I am currently having a small problem with Java Jframe and the button is not updating.
I try to disable the print button until the print of the new JFrame is printed and that the JFrame is closed ...
The button will be disabled only when and when a new window appears, but will not until then, which may take a little time ....
I set the button to disable by doing the following: PrintBttn.setEnabled(false);
I tried calling mainPanel.revalidate(); mainPanel.repaint(); PrintBttn.revalidate(); PrintBttn.repaint, as well as the mixture above, as they recommended in other forums ...
I am now lost in this and why it doesn’t turn off the button until a new window appears, since the first thing I do is turn it off, as shown above, and then go through and create a new window ....
Thanks, Erik
source
share