thread problem

i am creating one appliation in which i hade created one thread .

in the thread run method i want to create one jframe and wont to use all the element in that jrame like textbox etc.

i am bulding this application in netbeans

so i had created jframe in net beans

and in run method i am creating intance of that class and displaying it using setvisible(true);

but i am not able to access the textboxt etc which are there in form in run method

is there any way to access fom element(textbox in thread) how to do that please tell me

[572 byte] By [bhavin123400a] at [2007-11-27 6:12:17]
# 1
Unless I am very much mistaken, you don't want to create a JFrame in a run method. Otherwise, each time the run loops, a new JFrame will be created. Perhaps you want to create it in an action listener.
Tavea at 2007-7-12 17:19:22 > top of Java-index,Java Essentials,New To Java...
# 2

are you creating the JFrame with a call to the swingutilities invokeLater?:

javax.swing.SwingUtilities.invokeLater(new Runnable()

{

public void run()

{

// create and initialize your JFrame here?

}

});

It's something like this. I don't have my jvm set up on this machine so this is untested.

Message was edited by:

petes1234

petes1234a at 2007-7-12 17:19:22 > top of Java-index,Java Essentials,New To Java...