My JTextArea content is not refreshed, any ideas suggestions
Hi, I have a swing application which contains two text areas, during some process I print information in the textareas but information only appears once the "do while" is finished. Also I call a pause() which only is supposed to pause between each line but as I said the text area is only filled once the loop is over � thanks in advance for any good suggestions.
�
do{
outputContent("aaaaa");
pause(3000);
}while(action != null)
�
�.
pause(long p){
try {
Thread.sleep(p);
catch(InterruptedException e) {
e.printStackTrace();
�
outputContent(String p)
txtainfo.append(pt);
txtainfo.append("\n\r");
txtanotify.append(p);
txtanotify.append("\n\r");
All the events in Swing are registered with an Event Queue.
The queue dispatches events one by one. Components continues adding events in Queue and Queue continues dispatching events one by one. Repaint is one of that event. When a component think to repaint itself, it adds PaintEvent in Queue and Queue dispatches the event on it's required time.
In your case on each append the PaintEvent is added in the Queue but the thread is slept so after all appends all the paint events are fired one by one.
If you run your do-while loop into a thread then this thing will not happen as your new thread will sleep rather than main thread. So you can consider following:
new Thread(){
public void run(){
do{
// write content and pause
} while();
}.start();
May this help you.
Regards,
Similar Messages
-
i've had to reset my ipad to factory settings and restore from backup (have also got new softwear) my passcode is now not working - any ideas on the default?
Typos mad = and
Receive = retrieve -
I am having trouble looking at video podcasts on my ipod touch. they are all greyed out. I have tried removing them and resyncing. this did not work. any ideas?
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Unsync all media and resync
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device. -
Can't install mcafee in vmfusion running under windows xp; error is not understandable; any ideas?
Please repost in a VMWare Fusion forum, you can find it at:
http://communities.vmware.com/community/vmtn/desktop/fusion. -
i connect my ipad it shows in left side of itunes it is commencing sync then it freezes itunes and i have to disconnct it manually then a error message telling me that there is not enough disc space for ipad which is not correct any ideas folks
i have reset the ipad and restored it to no avail
-
running os 10.9.2 and ever since I loaded it, I am showing that I have a flagged message,which I can't find. Also, now have a 'flagged' message mailbox that I did not add. any ideas how to clear an apparently nonexistent flagge message in Maverick? I've tried all the basics and nothing seems to show
Have you tried resetting the SMC ? > Resetting the System Management Controller (SMC)
-
I am trying to save a custom code snippet in Flash CC and it does not save, any ideas why? I am using Windows 8.1 with Flash CC.
I even when into the "Edit Code Snippet XML" and added a Custom folder and a custom template. Then I went back to add the code snippet again and it still did not work.
About line 32, I added:
<category title="Custom"
isBranch="true" expanded="false"
description="Code for common interactions">
<snippet isBranch="false">
<title>Custom Snippet</title>
<description>This is an example of a custom code snippet.</description>
<requiresSymbol>true</requiresSymbol>
<code><![CDATA[
// Code goes here
trace("A custom code snippet");
]]></code>
</snippet>
</category>
Any assistance would be greatly appreciated.UserAgent for the OP is - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100405 Namoroka/3.6.3 - he might be running a 64-bit 3rd party build.
-
I disabled my iPhone 4 and while doing a restore via iTunes, it is downloading and timing out so the download is not completing. any idea how to get past that? I have tried many times and the same error keeps happening.
You need to force the phone into recovery mode, as described here, & restore it:
http://support.apple.com/kb/ht1808
Sorry, you've already lost all data on your phone. -
Photoshop 2014 (fresh install) cant open a video because: …. the dynamiclink media server is not avalable – any idea how to fix this on os x 10.5.8 ?
i found the error!
little snitch on os x blocks something (i dont know what exact) of adobe in the background. i have no rule defined for adobe in little snitch, so everything of adobe can go out.
when i stop little snitch, everything works fine - photoshop opens videos without the medialink error, photoshop starts up in seconds and premiere starts without a quicktime error.
i report the problem also to objective developement to fix this!
mad -
I want to buy some music and It is asking some question that I do not have any idea the answer
When I am trying to buy some music iTunes is asking me about some questions that I do not have any idea....
Hello Brandy,
Unfortunately, you can't change or etrieve them by yourself as you forgot the original ones. You may contact iTunes store support though. Here's what you can do:
https://expresslane.apple.com/
Follow these steps:
All Products and Services > iTunes > iTunes Store > Account Management > iTunes Store account security
Answer the questions and if required sign in with your Apple ID and password - same one you used to log in on this support forum.
You will find an option to send an email to Apple on that page. Indicate that you forgot the answers to your security questions and wait for iTunes support to reply.
I hope this helps. -
My MAC has version 10.4.11 and is a Powerbook G4. My ipod touch has version 4.2.1 and will not connect any ideas?, My MAC has version 10.4.11 and is a Powerbook G4. My ipod touch has version 4.2.1 and will not connect any ideas?
you need to install iTunes 10.
in order to install iTunes 10, you need to upgrade your Mac to OS X 10.5.
see system requirements here: http://support.apple.com/kb/DL1061 -
My digital editions saying not working but I uninstalled and reinstalled and it is still not working, any ideas?
Hi imtheozzman, check if your security software is the problem, see : [https://support.mozilla.org/en-US/kb/configure-firewalls-so-firefox-can-access-internet Configure firewalls so that Firefox can access the Internet ]
thank you -
I have lightroom 5.7 installed, and have just downloaded / installed Lightroom CC, but although lightroom 5 runs ok, Lightroom CC will not run, any ideas please.
What seems to be working for many users (myself included) is to sign out of CC and then sign back in. After signing back in, LR will run.
John -
my mac book pro 17 inch , 2008 year , display went dark after rebooting from origianl disc, and the steps in "everthing Mac" book did not work, any ideas?
The router might be bad or incompatible, but let's be optimistic.
On System Preferences, go to Network/Advanced/PPP. Only two items should be checked: Connect Automatically When Needed and Disconnect when switching user accounts. Uncheck everything else. Now, click Okay on the end of the page. The next time you're online, you shouldn't be disconnected.
If you still get disconnected like before, we might be dealing with a router issue - which can get rather complicated. -
my software update fails every time I attempt to update. I have restarted the device, selected software update but when it get to the end of "preparing software update", it fails and says the update was not successful. any ideas?
Welcome to the Apple Community.
If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
Connect the micro USB cable to the Apple TV and to your computer.
Reconnect the power cable (only for Apple TV 3)
Open iTunes.
Select your Apple TV in the Devices list, and then click Restore.
Maybe you are looking for
-
ParseInt gives different values for negative numbers than other browsers
Is this an known issue? I tested in Safari 4 beta (528.16), don't know about other releases. parseInt(-0.5) in Safari returns -1, while Chrome 3, Opera 10 and Firefox 3.5 returns zero. How can I workaround this?
-
BEx Analyzer - Hiding infocubes/multiproviders from querying
Hello, We are trying to deny the ability of users to query directly against multiproviders/infocubes/DSO's in BEx Analyzer. We recently upgraded to 7.3 and have migrated users to 7.x analyzer, but we want to eliminate this specific functionality for
-
10.6.8 issue - reinstall 10.6.7 or go to Lion?
I've had problems with the sleep command since installing the 10.6.8 update. The 10.6.8 supplement update didn't help the problem. It takes anywhere from 20 seconds to 50 seconds for my iMac to sleep. I've repaired permissions, and I did the AHT. No
-
Hi, Please provide the documents related SAP workflow.. <THREAD LOCKED. Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] to discover why> Edited by: Mike Pokraka on Sep 5, 2008 12:13 PM
-
Upgrading to InDesign CS4 from International English Upgrade?
Hi. can I use International English Upgrade from Adobe InDesign CS/CS2/CS3 (Mac) to upgrade my CS2 version of InDesign to Indesign CS4? Any answers would be much appreciated, many thanks! (I am running OS 10.4.11 on a Macbook from 2006) Lollinger