Results 1 to 4 of 4
- 03-28-2012, 09:54 AM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Problem visualize Jframe contents during the execution of an ActionPerformed
Hi guys,
I'm new on the forum and i hope to be in the right section.
I'm already sorry for the bad english i will use: i hope you will understand the question.
I have a problem. :)
I have a Jframe "MAIN: with a Jbutton "START" which is related to an action.
The action should create a new JFrame "SECOND" with a Jmenu, a text Area showing a particular String and, after that, execute a procedure "LISTEN" which will monitor a directory.
The problem is that the program creates the Frame "SECOND" , but i cannot see and interact with the contents as long the procedure "LISTEN" is not terminated.
Considering that the procedure never ends without any signal.
How can I fix it?
Because i would like to have the Frame "SECOND" with an "Exit" Button in a "File" Jmenu in order to send a signal and interrupt the procedure LISTEN and eventually terminate the program.
Thank you in advance for the patience and the help.
Cheers
gtotto
- 03-28-2012, 10:47 AM #2
Re: Problem visualize Jframe contents during the execution of an ActionPerformed
Why do they call it rush hour when nothing moves? - Robin Williams
- 03-28-2012, 02:26 PM #3
Re: Problem visualize Jframe contents during the execution of an ActionPerformed
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-28-2012, 03:44 PM #4
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Re: Problem visualize Jframe contents during the execution of an ActionPerformed
OK guys, sorry for the "cross-posting" and thank for the help.
I've still serious problem, even if i have understood a little the theory, i cannot implement the thing using the swing worker thread.
Normally I have a button.
I add the button a new ActionListener.
The ActionEvent related should does :
1- Open a new Frame with some features and i would like to associate this operation to a Swing Worker, because i need user is allowed to interact with it,
in this case for example i don't understand where should i define the frame. In "doinBackground" or in the method "done()"?
2- Another Frame where is running a procedure, which is cycling into a while(true).
How should i do?
Could someone suggest me the structure?
Thank you,
gtotto
Similar Threads
-
How To Make JFrame Invisible And Contents Visible?
By Kuttappu in forum Advanced JavaReplies: 3Last Post: 01-06-2012, 06:52 AM -
Terminating execution of a JFrame without terminating execution of child frames...
By nish.singha20 in forum AWT / SwingReplies: 6Last Post: 11-30-2011, 08:39 PM -
adding component(object?) to JFrame after actionPerformed
By Shargath in forum New To JavaReplies: 1Last Post: 04-10-2011, 02:06 PM -
JFrame created but window contents not showing, othr threads keep waiting on the user
By FezKazi in forum AWT / SwingReplies: 1Last Post: 02-20-2009, 03:49 PM -
actionPerformed problem
By tomitzel in forum New To JavaReplies: 1Last Post: 01-08-2008, 06:10 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks