Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Detect if a JFrame is already opened

843810Apr 28 2006 — edited May 3 2006
I've a problem on a desktop MDI application, when the user click on and image, the application open a JFrame for the larger image, but every time the user click on it it open a new window.

How can i prevent this? Can i check if the window is already opened?

here is my code:
public void mouseClicked(MouseEvent e) {
                DettaglioImmagine formdettimm = new DettaglioImmagine(MainForm.WorkingDir + "/immagini/DimCatene/" + catena.getChild("immaginedimensionigrande").getText());
                formdettimm.setVisible(true);
            }
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2006
Added on Apr 28 2006
3 comments
841 views