This content has been marked as final. Show 14 replies
" All Swing constructors and methods should be invoked only on the EDT. ". Is this rule was included in Jdk7 or was existing in previous jdks also.? I am using EDT in my code. One more question i have , is there any change in EDT code in jdk7 such that it will affect any change in response time .
Edited by: 950420 on Sep 10, 2012 2:08 AM
Edited by: 950420 on Sep 10, 2012 2:42 AM
" All Swing constructors and methods should be invoked only on the EDT. ". Is this rule was included in Jdk7 or was existing in previous jdks also.?All JDKs since Swing was included (1.2 IIRC). See the tutorial chapter http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html (a must-read, must-know, and must-apply).
I am using EDT in my code.What does that mean? You previous questions suggests that you didn't know this rule.
950420 wrote:Swing was always single threaded. Some of the methods that were documented to be thread safe up to JDK 6 were in fact never thread safe, and the qualification has been removed in the JDK7 documentation.
Is this rule was included in Jdk7 or was existing in previous jdks also.?
is there any change in EDT code in jdk7 such that it will affect any change in response time .Huh?
I also see some time below error also:
java.lang.Exception: Stack trace
at java.security.AccessController.doPrivileged(Native Method)
950420 wrote:As you have been told already (twice), the meaning of this sentence is very ambiguous.
I was using EDT. May be i was not 100% sure about the usage of it.
To understand why you should read this chapter of the Swing tutorial (but it's a bit involved): http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html
as i posted the error place , even that wont help ?As you have been already told (twice)... no :)
Your best chance to get further help is, as you have already been told (twice), to provide an SSCCE (http://sscce.org).
The good thing with an SSCCE, is that it will help you isolate the problem to where it really belongs (there is probably only a small part of the code is really involved in the error, and a lot of incidental code that has nothing to do with the error). From there two possibilities:
- you may be able to find out yourself (very self-rewarding, and it will teach you a lot). If you do please post about it anyway, as a courtesy to those who tried to help you.
- you don't find yourself, but you can post the (short but complete) code here for other to reproduce and analyze it.
Either way, if solving the problem is important to you, the effort will pay.
If solving the problem is not that important, then drop the effort - but inform us here, as a courtesy to those who tried to help you.
Edited by: jduprez on Sep 21, 2012 11:59 AM