JPanel doesn't show new text after JLabel edit

Hello,
I am trying to create a custom progress bar-esk window to show users during lengthy methods.
I have a new Thread which creates and displays a new ProgressWindow object (a JFrame with a JPanel and JLabel attatched). At second intervals the text of the JLabel attatched to this frame will change. however the text seen in the window is not updated.
System.out's show the value of the JLable to be correctly changing.
Here is the code for creating the Thread and window:
     Runnable r = new Runnable() {
                    public void run() {
                        try {
                            prog = new ProgressWindow();//creates the frame
                            prog.addStuff();//adds the components
                            prog.addListeners(inter);
                           while(true){
                               prog.makeAnimation();
                        } catch (InterruptedException ex) {
                            ex.printStackTrace();
                        } catch (IOException ex) {
                            ex.printStackTrace();
               new Thread(r).start();and the code within the ProgressWindow class which updates the label
public void makeAnimation() throws InterruptedException, MalformedURLException {
        Thread.sleep(1000);
        if (dots == 0) {
            System.out.println("dots 0");
            labelPanel.remove(dotty);
            dotty = new JLabel("Analysing input  ");
            labelPanel.add(dotty);
            labelPanel.repaint();
            dots++;
        } else if (dots == 1) {
            System.out.println("dots 1");
            labelPanel.remove(dotty);
            dotty = new JLabel("Analysing input .");
            labelPanel.add(dotty);
            labelPanel.repaint();
            dots++;
        } else if (dots == 2) {
            System.out.println("dots 2");
            labelPanel.remove(dotty);
            dotty = new JLabel("Analysing input ..");
            labelPanel.add(dotty);
            labelPanel.repaint();
            dots++;    
        } else if (dots == 3) {
            System.out.println("dots 3");
            labelPanel.remove(dotty);
            dotty = new JLabel("Analysing input ...");
            labelPanel.add(dotty);
            labelPanel.repaint();
            dots = 0; 
    }I assume this is a threading issue, however I don't understand why the value is correctly changing, but not being repainted. I'd appriciate any insight :)
thanks :)

Fillis52 wrote:
..As for the SSCCE, I have looked at the linked site and honestly thought I had met the requirements. The code was formatted, and only the methods which presented the problem were given. Should I have included the code to create the window also?The first 'S' seems covered, but it is not SC, C or an E. Which part of the words associated with those letters are you having trouble understanding?
If you had copy/pasted your code into the STBC (as recommended in the SSCCE document), it would have been obvious that it was not an SSCCE.
Instead of being rebuked, I should be told what is missing from my post in order to create a SSCCE as i obviously dont know how to do it properly.You expect us to have a crystal ball? Instead of complaining, it would be more productive to be specific about what part of S-SC-C-E document you do not understand. And this time, read it carefully, don't skim it.

Similar Messages

  • SMS inbox doesn't show new messages after upgrading to OS 5.0.0.681. SMS format appears as IM.

    My SMS inbox doesnt show new messages and also my Curve 8900 doesnt prompt for any new messages. However, the Mobiso application (which logs calls, texts) shows messages coming in with its text lengths. I asked this to Blackberryhelp on Twitter but it said to contact service provider, but there is nothing wrong with it. The format of the SMS inbox should have something wrong otherwise the Mobiso application should not have logged all messages.
    Please help me, i am missing all my daily SMS since last 20 days.
    Will degrading the OS help? Which is recommended OS version for BB Curve 8900?

    Hi,
    Here are some good articles listing the available methods for organizing and displaying messages in device OS 5.0. If you can't set your exact preferences I suggest looking in AppWorld for custom programs.
    Let us know how it goes!
    Thanks,
    Bifocals
    What is new in BlackBerry Device Software 5.0    
    Option for separate SMS and Email message inboxes is missing
    How to integrate SMS text messages with BlackBerry Messenger 5.0
    SMS text messages received from multiple senders appear in the same conversation thread on the Black...   
    Organizing your inbox’s main Messages list
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    1) Is it a video clip? Something you recognize?  To be clear, it's displaying at a point in your exported movie but doesn't appear at all in the sequence?
    2) What are your sequence settings?  Right-click your sequence and choose "Item Properties" to verify.

  • Mail doesn't show new messages

    Mail sometimes doesn't show new messages for an IMAP account. The badge in the dock says that there is a new mail but it doesn't show up in the inbox. I'm sure that I didn't just miss it, because, smart mailboxes will not find that new mail as well. When I restart mail, the mail finally shows up in the inbox as well.
    Anybody else seeing this and what can I do to resolve that issue?
    Thanks!

    I'll bring everyone up to speed on what's been happening with my family accounts. I first suspected Safari, because it seemed to be a local problem, but then, inexplicably, all mobileme mail accounts tied to that family account, which included 4 subaccounts and 1 mail-only account, not only did not work in mail.app, but also failed in other email clients I tested, including clients on Linux. Also, the webmail version was not working well, either.
    So, if your problem is isolated to a single computer and just to mail.app, or just with a particular network, then I think the local troubleshooting steps are the way to go.
    But, if your problem extends to other platforms, clients, and webmail, then it is likely an issue the engineers at Apple will have to figure out. I found the online chat service for mobileme users to be very helpful in checking through all the 'usual suspects' and after we had pretty much ruled out any of the usual culprits, it was escalated to the engineers, who are working on it now.
    They were able to release all the email that had been piling up, but there are still some glitches they are trying to iron out. As an aside, I have been personally managing various mail servers for a dozen years, and am well aware of the difficulties in diagnosing email problems, and it was stumping me, and I have intimate knowledge of Exim and Exchange and various email modules used with mx services.
    +While this 'should never happen', it's unrealistic for users to expect it never will. Of all the services provided on the Internet, email, is arguably the most complex service and it's become much more complex in the past few years. In my work, typically 94% of all email traffic hitting the server is filtered out as spam. So, the 6% that is allowed through is the stuff most of us see and are spending time and resources filtering out the 20-40% additional unwanted spam that the host let through because if they tightened it down any further the risk of false positives would become too great. I spend way more time on the mail service aspects of my job than the web services, and mail problems occupy at least 80% of my troubleshooting logs. So, while email seems more 'simple' than the exotic and bandwidth intensive services like video chat, voip, and web2 transactions, compared to the amount of wasted bandwidth and cpu cycles filtering packets, I think email is the number one problem service for most host providers. We tried to depend upon it for mission-critical communications, and it was never designed for that initially, and the spammers are making certain it won't achieve that status at least in the near future. If anything, email is your least dependable Internet service. Combine this with the growing array of user configurations, email clients, forwarding/retrieving/syncing scenarios, and user experience, and you may find yourself uttering a little prayer now and then for the poor email administrators and support personnel.+
    [end of sermon - thanx for letting me get that off my chest; I feel better now! I'll feel a lot better when my email is flowing smoothly, but that's out of my hands for now.]

  • Touch ignores new events in ical and iTunes doesn't show new calendars

    Hi
    i just set my Touch (2nd gen 2.1.1) back to the factory settings with a freshly created itunes lib.
    My problem was (and still is) that i couldn't sync new events from my macbook to the touch.
    i also created a new calendar to ical and checked if naming could be the reason. but the new calendar doesn't show up in the info part of itunes. even if i select replace all calendars on my ipod.
    an strange and annoying problem.
    cu assetburned

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable              
    - Try on another computer                    
    Also see
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or                     
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - Then do the other actions of:
    iOS: Device not recognized in iTunes for Windows
    paying special attention to item #5
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              

  • Disk Utility doesn't show new drive when trying to install Snow Leopard

    Please help because I've searched everywhere. My MacBook's hard drive failed. It's done for. I bought another internal, Western Digital 320gb WD3200BEVT. So it's brand new and when I boot from the Snow Leopard install I don't see the new hard drive in the Disk Utility App. All I see is my CD-Drive. No where is my new drive so that I can at least format it. People suggested on other forums that maybe it's the cables but i don't think it is cause the hard drive you just slide in and out. There are no jumpers on this drive either, so that's out. I've narrowed it down to two things, bad hard drive or this drive just isn't recognized by by Snow Leopard?

    If you have tried restarting a few times and it still doesn't show up I'm afraid you are gonna have to go back in and check the connections. I know they just slot into the carriage, but possibly it is not in tight. I can only suggest you open it up and check everything thoroughly. If after a thorough check, if it still does not mount you may want to take the hard drive back and swap it. Are you sure it was only a hard drive failure in the first place? I only ask this because WD hard drives have quite a solid reputation.

  • Find a string in a file and write a new text after it

    hi
    i try to search a string in a small text file. after this position I should write a new text (it is not the end of the text, it could be somewhere between).
    I tried to solve this with the StrginTokenizer, but it does not work properly, any other ideas how to solve this?
    thanks for your comments
    steinfresser

    To insert text into the middle of a file you use the process that has been used since the first text editor was invented over 50 years ago:
    1. Read the text from the file up to the insert point, and write it to a new file.
    2. Write the inserted text to the new file.
    3. Read the rest of the text from the file, and write it to the new file.
    4. Delete the file.
    5. Rename the new file.

  • ICal doesn't show all text for the activity

    When I updated to iCal version 8.0 i noticed that when I am in week-view, iCal doesn't show all the text for an activity, although there is plenty of room. For example I have a lecture from 9 am - 4 pm and in the activity I put down all the things I have to do, but it only shows the first line for my activity. I need to drag the box or double click on it to see all the text. Can I change this?

    Gabriella,
    Sometimes making the Calendar window bigger, or using full screen allows additional text to be displayed.
    View>"Make Text Smaller" is also an option for those with Eagle Eyes.

  • Scrollbar doesn't show all text in RichEditableText component ...

    The program is loading text from an external XML-file into a RichEditableText component.
    However, scrolling an scrollbar does not show all the available text.
    To me, it looks like the scrollbar is not updated to adopt itself to the new text.
    Does someone has any pointers, how to fix this, because I have no clue where to look?
    Thanks in advance,
    Peter
    Code snippets:
    The bindable 'data' is filled with an html-formatted text, when the XML-file is loaded.
    TextFlow is used to display the html-formatted text.
    MyTextScrollPanel component contains VScrollBar and component MyTextScrollPanelScrollingContentSkin:
    <s:VScrollBar id="vscrollbar" left="185" right="0" top="0" bottom="0" fixedThumbSize="true"
    viewport="{contentGroup}" />
    <components:MyTextScrollPanelScrollingContentSkin id="contentGroup" clipAndEnableScrolling="true"
    left="0" right="20" top="0" bottom="0"/>
    MyTextScrollPanelScrollingContentSkin component:
    <fx:Script>
              <![CDATA[
              [Bindable] public var data:String;
              ]]>
    </fx:Script>
    <s:RichEditableText id="textContent" d:userLabel="Text" x="0" y="0" width="185" height="682"
                                  editable="false" selectable="false" color="#ffffff"
                                  fontFamily="Myriad Pro" fontSize="12" tabStops="S0 S50 S100 S150 S200"
                                  textFlow="{TextConverter.importToFlow(data, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
                                  whiteSpaceCollapse="preserve" >
    </s:RichEditableText>

    One (practical) solution I came up myself, is adopting the height of the RichEditableText to the length of the data:
    <s:RichEditableText id="textContent   ...  height="{data.length}"      .... />
    A practical height value turns out to be {data.length/2}, indicating that 50% of the text is html-tags and whitespaces (??)
    Does someone knows or could point to a more elegant solution?
    Note: the division "/2" worrows me, since the customer is proving the text.
    Thanks,
    Peter

  • Cannot generate a Key. Manage Account menu doesn't show up even after following Help articles. Correct username, e-mail and password. I already have a Firefox Sync Account but cannot Add a Device. No way to Sync due to no Key.

    I cannot generate a Key to Sync between two computers. Manage Account menu doesn't show under Options > Sync > Firefox Sync Setup > I already have a Firefox Sync Account > I don't have the Device with me. No Sync Key no matter how hard I tried.

    Yes I did. '''''I solved this issue last night.''''' First I had to Clear My Sync Data, then Yes I Already Have a Sync Account [enter User, Password] and only then the Key appeared in its proper field. Went to the 2nd computer and wrote down the Key after I Already Have a Sync Account. The bottleneck was to enter into Mozilla server after resetting pass and user, and then, clear data.

  • Firefox doesn't show original text when replying an e-mail in Hotmail

    Firefox doesn't show the original text when replying an e-mail message in Hotmail. It's not an account issue since I've tried the same with Explorer and the original text DOES show...
    == URL of affected sites ==
    http://www.hotmail.com

    anyone fix the problem yet?I cleared my cookies and that didnt work.

  • Nano ver 6 doesn't show up even after reinstalling iTunes which had to be done because of problems with all Apple devices after trying to update iTunes via a message from Apple.

    Nano ver 5/6 doesn't show up in iTunes even after having to reinstall iTunes because of problems with trying to update iTunes after receiving message from Apple that an update was available.  Other Apple products are showing up.

    Hello Bill,
    Thank you for the details of the issue you are experiencing with your iPod nano.  I recommend reviewing this article for steps to take when your iPod is not recognized in iTunes:
    iPod not appearing in iTunes
    http://support.apple.com/kb/TS3716
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • N8 doesn't show new SMS messages

    Hi,
    i've recently noticed that my N8 does not show anything that there is a new SMS. I have to check every now and then for inbox for SMS:s to know if i have received an text message. I have checked for updates for firmware, but there is no newer available.
    What can i do for it?
    Best greetings
    Perttu

    There is a homescreen widget that will show new messages (plus missed events and calls), it is called "notifications" just edit the homescreen and add it
    Also you can get the menu button light to flash if you have unread messages, to set go to Settings > Phone > Notification Lights > notification light
    N8-00 pc059C9F6 Belle
    808 PureView pc059P6W5

  • Finder doesn't show some files after several days of uptime

    It is several days my MacBook Pro is turned on:
    $ uptime
    11:08  up 10 days, 12:02, 2 users, load averages: 1.12 0.80 0.60
    and Finder is starting to behave strange...
    the first thing I noticed is that it doesn't show anymore the contents of application packages (ie. right click on a .app and click Show Contents, shows an empty finder window, like there were no files, but from Terminal I'm able to see contents).
    also some other files are not visible. for instance I just downloaded a file in Safari, but I can't see it in its folder with Finder, but I can see it and open it with Terminal.
    before trying a reboot, what could I do to solve this issue?
    perhaps restart Finder? but what is the correct way of restarting it? killall Finder (or some signal other than SIGTERM)?

    To restart Finder, hold the option key whilst "right-clicking" (or two-fingered tap on a trackpad), on the Finder option in the Dock.
    You will see an option to "relaunch".  Select it, and Finder will restart.

  • Java preferences window doesn't show the tabs after jdk 7 update 7 installations

    java preferences window doen't show the tabs after jdk 7 update 7 installations, before the installations of jdk 7 u7 the tabs in the java preferences window were visible

    Then, dump Chrome or uninstall Java 7u7 and connect back tol Java SE 6:
    Q: Can I restore Apple Java 6 after uninstalling Oracle Java 7?
    A: Go back to Apple Java 6 using the following instructions:
    Uninstall Oracle Java 7 by deleting the plug-in file. From a Terminal window enter:
    sudo rm -rf /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
    Create a symlink using the following command, entered on a single line:
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

Maybe you are looking for

  • ASA 5505 vpn/OWA issue

    I have a client that is running Win2003 Server R2 with Exchange Server 2003. OWA was setup and clients could connect to their exchange mailbox from the internet with no problems. We recently configured vpn on the ASA 5505 and now no-one can connect t

  • No Plant is assigned to Vendor 200002

    Hi I have got a message while creating a Purchase Order as below. What might be the actual problem. And also give me the explaintion of Cross-System flow of Goods No plant is assigned to vendor 200002 Message no. AIPLOC002 Diagnosis You have tried to

  • Update amavisd-new on 10.6.8

    Hi All, I am planning to migrate to 10.6.8 server from 10.4.11. I have read a few issues with amavisd and would like to address them before users start driving me nuts. My understanding is that amavisd 2.6.2 or 2.6.4 is installed under OSXS 10.6.8. I

  • If I click on a link Firefox does not advance to the link but shows "Done".

    On most web pages, Firefox fails to advance to a new page when I click on a link. It shows the link info at the bottom of the bpage but then immediately shows "Done" If I switch to IE, it uysually works there. I would prefer to continue using Firefox

  • How do I give a credit from my account to another person?

    I would like to give my iTunes credit to someone else. How do I do that?