If you make basic runnable example with the problem, I would look into it.
public class YesNoDialog extends JDialog {
...
...
...
void jButton2_actionPerformed(ActionEvent e) {
this.yes=false;
this.setVisible(false);
}
so, very simple, the class has 2 buttons, one yes and one no and apparently stores the result so that the game can read it. When the this.setVisible(false) is execute, The next frame that gets painted when it closes is the screen like it looked before i opened the dialog BUT the area where the dialog sat on is a white rectangle.
I understand that this is some kind of buffer problem that when the dialog releases control of the buffer. I know that I start using some buffering technique so solve it but I wonder if there was any elegant solution to this that means Swing will handle it without interfering.
I tried to (from outside the dialog code) paint over the dialog and then close it afterwards but still when i close it (despite the jdialog being invisible!) the white rectangle appears.