Article View: borland.public.jbuilder.java.language
Article #15882multi-threading
From: John McNair
Date: Mon, 26 Apr 1999 00:00
Date: Mon, 26 Apr 1999 00:00
26 lines
1454 bytes
1454 bytes
I am having a problem with multi-threading with a very simple
example. The user makes some choices on a form, and based on those
choices, another form is spawned which merely displays a table object
with data generated from the user choices. When I close the table form,
the parent form is killed as well. Here is the code that launches the
second form:
// Make a new thread here.
Thread thrfrmDisplayTable1 = new Thread() {
public void run() {
frmDisplayTable frmDisplayTable1 = new frmDisplayTable();
frmDisplayTable1.strTmpData = "SELECT * FROM " +
strTmpTableName;
frmDisplayTable1.OpenData();
frmDisplayTable1.setVisible(true);
frmDisplayTable1.strTmpTableName = strTmpTableName;
}
};
thrfrmDisplayTable1.start();
Why wouldn't killing the second form leave the first untouched?
--
John McNair
Computing Solutions
jmcnair@compsolve.com
Technical Details
Message-ID:
<3724F478.93B5B7E0@compsolve.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,aa6859e95fc687e5,start X-Google-Attributes: gidf74b3,public From: John McNair <jmcnair@compsolve.com> Subject: multi-threading Date: 1999/04/26 Message-ID: <3724F478.93B5B7E0@compsolve.com> X-Deja-AN: 471241101 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Computing Solutions Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language