Article View: borland.public.jbuilder.java.swing
Article #8879Re: let JFrame being opened only once?
From: Jay Guha
Date: Mon, 10 Jul 2000 00:00
Date: Mon, 10 Jul 2000 00:00
25 lines
1304 bytes
1304 bytes
HI, A good way to do this, is to see how the DM (datamodule) functionality works. A DM instance is 1 & only one (and is shared by any other component) - helps to centralize all DB oriented effort essentially, there is a private , static variable located in the DM, then u expose this variable via a public static memberfunction, and all other components use this memfn to get access to the singleton instance Use the same concept in your frames - there are good examples in the samples Cheers Jay Guha... X_Aki Nieminen_X wrote: > I want to restrict users to open only one instance of JFrame form at time, > how to detect and focus to appropriate form? > > Users can have may forms opened, but only if they are different one.
Technical Details
Message-ID:
<3969FF7A.ED6F35CD@apogeenet.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3969771f@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,47a254fcc9d88f88 X-Google-Attributes: gid111d45,public From: Jay Guha <jayg@apogeenet.com> Subject: Re: let JFrame being opened only once? Date: 2000/07/10 Message-ID: <3969FF7A.ED6F35CD@apogeenet.com> X-Deja-AN: 644667897 Content-Transfer-Encoding: 7bit References: <3969771f@dnews> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing