One instance of JFrame, JDialogs

HiHow can I ensure that only one instance of my JFrames / JDialogs appear. Thanking you in advance,Dude
[131 byte] By [java_swing_dudea] at [2007-10-2 10:40:46]
# 1
Search the forum. Maybe:"jframe one instance", or"jframe single instance"be creative.
camickra at 2007-7-13 2:47:57 > top of Java-index,Desktop,Core GUI APIs...
# 2

some of the applications use configuration files to do this.

like if an application is run it puts an entry in a file and when it is closed the entry in the file is removed.

one more way is to use windows registry(since java has registry support) but i don't know how it would behave on other platforms.

every time the user runs the application checks for these entries.

whatever the case but this is not fail-safe. if some exception occurs and user exits the application from task manager, the entry is left behind. so always give the user an option even if the application thinks its already running.

sharath_ka at 2007-7-13 2:47:57 > top of Java-index,Desktop,Core GUI APIs...