I'm doing a project in java.
I have a JButton on my JFrame, specifically a "File" button, when I click in my button appears a new JFrame with "File options, like: New, save etc." Everything works fine in this process.
The problem is, when I click the button again to dissapear the new frame. The new frame disappears from the first frame, but remains in back of the first frame.
I want to kill the process of the new frame, as I do that?
Here is my code:
ECVOP01 ecop01 = new ECVOP01();
if (evt.getClickCount() == 1) {
ecop01.setVisible(true);
} else if (evt.getClickCount() == 2) {
ecop01.setVisible(false);
}
Aucun commentaire:
Enregistrer un commentaire