ProgressMonitor not showing properly

Sorry for cross-posting, but in general Java programming, nobody seems to have any idea. The original thread is http://forum.java.sun.com/thread.jsp?forum=31&thread=319651
Here's what it's about:
I've got a little prob using ProgressMonitor. I'm coding an Applet which loads some images. Since this task may take a while, I'm trying to use ProgressMonitor to show a dialog window with the corresponding progressbar to indicate how much work's done already.
My code looks like this:
// Image[] images has been filled before.
// mt is a MediaTracker which surveys the loading.
ProgressMonitor pm = new ProgressMonitor(
  null,
  "Loading images",
  0,
  images.length - 1
for (int i = 0; i < images.length; i++) {
  pm.setProgress(i);
  pm.setNote(images[ i ].toString());
  // actual image loaded?
  while (!mt.checkID(i, true)) { 
    // if not wait:
    Thread.sleep(10); 
if (mt.checkAll() && !pm.isCanceled() && !mt.isErrorAny()) {
  pm.close();
// everything successfully loadedThe loading of the images works fine. My only prob is with the ProgressMonitor which starts showing after the default time (might be one second) - but the frame it shows is corrupt. You can see the outlines of it, but none of the contents is displayed - not to talk of the progressbar. Simply nothing.
Did anyone encounter this prob as well and has some ideas what's wrong? Any help would be appreciated.
Cheers,
kelysar

Hi again.
I get the point described in that other thread - but I've got a little problem transferring the solution to my problem. The situation is this:
I've got as class derived from JFrame which shall show thumbnails of some images. In the constructor of that class I call an init()-method in which I'm loading the images to be displayed. I want the ProgressMonitor to survey the loading of the images since that's what is taking most time. In short and pseudo-coded this looks like:
class PicFrame extend JFrame {
  public PicFrame() {
    // do all initializations, and..
    init();  // this shall load the images etc.
    pack();
    show();
  public void init() {
    ProgressMonitor pm = new ProgressMonitor(...);
    pm.setNote("starting");
    pm.setProgress(1);
    for (all images specified in an array) {
      pm.setProgress(index of current image);
      pm.setNote(name of image);
      load image with a MediaTracker
    if (not cancelled and all images loaded fine) pm.close();
}How am I able to separate the loading of the images into a second thread and update the ProgressMonitor without being blocked by the loading thread?
I'm still chewing on this - so I'd be glad to see any suggestions.
Thanks again for the idea.
cheers,
kelysar

Similar Messages

  • Thai characters not showing properly

    Hi,
    When creating a product catalog in thai language the characters do not show properly. The characters have small aspects attached to them that hover above as you can see here http://www.gte-premium.com but when editing in Indesign the small aspects that are meant to hover above overlap the portion of the character below and are not aligned left to right properly.
    I have tried every thai-friendly font I can find but this does not fix the problem, how can I amend this?
    Thanks in advance

    If you're using a well-made font, you can probably get the tone marks to behave by turning on the World-Ready Composer. It's exposed in InDesign CC and CS6, in the Paragraph menu I think, but if you're using an earlier version of InDesign it's a hidden feature that you would need to use a script or a plugin to turn on.

  • Anychart labels not showing properly..

    Hi all...
    Anychart Version: 5.1.2
    I have a bar simple bar chart which calculates surgeons and their percentage of surgeries.
    x axis: surgeon name (labels rotated to 90 degrees)
    y axis: percentage
    If i am just showing 10 surgeons it is showing properly.
    But if am trying to show all the surgeons (around 100 surgeons on x axis).
    The Flash chart x axis labels are not showing properly
    In this thread..Austin suggested to increase the width of the chart
    APEX Flash Chart labels not displaying
    If i increase the width the labels are showing properly. But the chart looks so ugly with huge width. Is there any other way to show the labels properly
    without incresing the chart width
    In Mozilla filefox i checked the XML returned. In the XML it is showing the labels but in the chart
    it is not showing up.
    Sample X axis..
    The X axis is looking like this..
    s s
    u u
    r r
    g g
    e e
    o o
    n n
    1 3
    It is not showing the "surgeon 2" which is between 1 and 2
    This is custom XML that i am using..
    <anychart>
    <margin all="1"/>
    <settings>
    <animation enabled="true"/>
    </settings>
    <charts>
    <chart use_anychart3_data_model="true" use_sets_colors="false">
    <chart_settings>
    <title enabled="True" vertical_padding="30">
    <font bold="True" size="15" />
    <text>Death by Surgeon</text>
    </title>
    <subtitle enabled="True">
    <background enabled="false" />
    <font bold="False" size="15" />
    <text>Arranged by Increasing Annual Rate of Procedure</text>
    </subtitle>
    <footer enabled="true" align="Center" padding="30">
    <background enabled="false" />
    <font bold="False" size="12" color="Red"/>
    <text><![CDATA[Notice: This report generated considered privileged and confidential. &APP_TIME_STAMP.]]></text>
    </footer>
    <axes>
    <y_axis>
    <title><text>Percentage</text></title>
    <labels>
    <format>{%Value}{numDecimals:0}</format>
    </labels>
    </y_axis>
    <x_axis tickmarks_placement="Center">
    <title><text>Surgeon</text></title>
    <labels rotation="90"/>
    </x_axis>
    </axes>
    </chart_settings>
    <data_plot_settings default_series_type="Bar">
    <bar_series>
    <tooltip_settings enabled="True">
    <format>
    {%SeriesName}{numDecimals:2,thousandsSeparator:}
    {%YValue}{numDecimals:2}%
    </format>
    </tooltip_settings>
    <bar_style>
    <states>
    <normal>
    <fill color="%Color"/>
    <border color="DarkColor(%Color)" thickness="1"/>
    </normal>
    <hover>
    <fill color="LightColor(%Color)"/>
    <border thickness="2"/>
    </hover>
    </states>
    </bar_style>
    </bar_series>
    </data_plot_settings>
    #DATA#
    </chart>
    </charts>
    </anychart>please help me to solve this

    Hi,
    100 columns is a lot of columns. I understand why you are having this issue. I think you have two options here:
    First, you could use a scrolling chart.
    your x-axis custom XML would look something like:
    <x_axis tickmarks_placement="Center">
    <title><text>Surgeon</text></title>
    <labels rotation="90"/>
    <zoom enabled="true" allow_drag="false" />
    </x_axis>Second, you could reduce the font size of the labels on the x-axis to a very small number, so that the text of the label is not wider than the column width. With 100 columns, you are probably talking about a terribly small font size, probably making it unreadable.
    your x-axis custom XML would look something like:
    <x_axis tickmarks_placement="Center">
    <title><text>Surgeon</text></title>
    <labels rotation="90">
    <font size="4" />
    </labels>
    </x_axis>Austin
    Edited by: AustinJ on Feb 11, 2011 11:13 AM - fixed typos

  • Javax.swing.ProgressMonitor-dialog not showing properly

    Hi @all,
    I've got a little prob using ProgressMonitor. I'm coding an Applet which loads some images. Since this task may take a while, I'm trying to use ProgressMonitor to show a dialog window with the corresponding progressbar to indicate how much work's done already.
    My code looks like this:
    // Image[] images has been filled before.
    // mt is a MediaTracker which surveys the loading.
    ProgressMonitor pm = new ProgressMonitor(
      null,
      "Loading images",
      0,
      images.length - 1
    for (int i = 0; i < images.length; i++) {
      pm.setProgress(i);
      pm.setNote(images[ i ].toString());
      // actual image loaded?
      while (!mt.checkID(i, true)) { 
        // if not wait:
        Thread.sleep(10); 
    if (mt.checkAll() && !pm.isCanceled() && !mt.isErrorAny()) {
      pm.close();
    // everything successfully loadedThe loading of the images works fine. My only prob is with the ProgressMonitor which starts showing after the default time (might be one second) - but the frame it shows is corrupt. You can see the outlines of it, but none of the contents is displayed - not to talk of the progressbar. Simply nothing.
    Did anyone encounter this prob as well and has some ideas what's wrong? Any help would be appreciated.
    Cheers,
    kelysar

    Hi.
    Solved this one as can be found in the Swing forum at http://forum.java.sun.com/thread.jsp?forum=57&thread=321045
    Cheers,
    kelysar

  • Document not showing properly when opening in Acrobat 9 Pro

    When I create a document in InDesign and export it as a PDF, I want to see what it looks like as the PDF. One of the documents that I opened does not look as it should. It only has the photo on the ad but is missing the red background and the words on the ad. As a thumbnail, it looks correct. But, it is not showing up correctly when I open it in Acrobat. Some of the other ads are fine but this one in particular is not showing me all the elements. What do I do to fix this?

    Yes, I have the most current version of AA9. I exported the document from InDesign using the PDF exporter. That is what I have used for years and it has worked fine. I just installed CS4 yesterday.
    I think I realized what the problem is but I don't know how to fix it properly. I actually went back to the preferences in AA9 to the document color options in accessibility and changed it back to its original state (which, I believe, is where nothing is checked). I had originally changed it because I was trying to experiment with the background of the program. It's black and when I open a PDF, I can't see the black border. But I mistakenly changed the document color. Which brings me to the question of: how do you change the background color of the page so that I can see the black border on the document? I sell advertising so I need to be sure that when people send me their ads, they have black borders. And I can't tell when it has the background behind the document so dark. Acrobat Reader has a white background.
    Additionally, can I still install the latest Acrobat Reader and use that instead of AA9 if I want to? It seems easier.

  • OBIEE 10g: BI Publisher page not showing properly

    Hello all,
    I have installed OBIEE 10g on a VM with operating system: XP, service pack 3.
    Analytics and Admin tool (I was able to create a new repository) are showing properly but when i try to login to the BI Publisher I just see two folder available "Shared folders"
    and "My Folders" and all the other functionalities are missing. Also in the Preferences tab I just see "General Preferences"
    and nothing else. I have logged in as an Administrator user but i think the problem is that this user doesn't actually have admin rights when it comes to BI Publisher module.
    I tried to give some more permissions through Analytics>Settings>Manage Privilleges but there was no progress.
    Can you please give me some guidance on that issue?
    Thanks in advance,
    Dina

    Hi,
    i got exactly the same pb. Word 2007 32 bits + Oracle BI Publisher Desktop 11.1.1.7.0 for 32 bit Office on Windows (244 MB)
    I can see the BIP Menu in Word,
    but the sub menus are : menu2007.logon, menu2007.load_xml_dat ... and of course are not working !
    What is wrong ?
    thanks for help

  • JPG from Illustrator not showing properly

    Hi,
    I'm using Illustrator CS4 to make still images like backgrounds and other stuff for my videos. I export them as JPG using the "Use artboard" export option in Illustrator and select "All" so all the artboards export at once.
    I end up in this case two differents backgrounds named "image clip-01.jpg" and "image clip-02.jpg".
    When I import them into Premiere, I can see my two differents images in the Project and Source Panel, but if I drag them into my sequence, those two images become the same. I mean the image number 01 looks like the image number 02. So even if I have two different images with two differents names, the first one preview is not showing in the sequence. I'v double check , re-exporting etc, same thing. Rename the files. Same thing.
    The only way I can have my images to properly show is when I export them one by one in Illustrator. It's ok for two images, but when I have several of them, it's pretty annoying.
    Any ideas how to fix that?
    Thanks!

    What happens if you Open those JPEG's in Photoshop, then just Save them, and Import. Do they now show the proper Image?
    Are you using PrPro CS 5, or 5.5? There was a Bug in CS 5, where Still Images did not show correctly, and the little trip through Photoshop solved the issue. I believe that CS 5.5 fixed that.
    Good luck,
    Hunt

  • Width of my site does not show properly on phones

    If you visit www.emilseres.com from a cellphone (let's say iPhone), why doesn't the width of the site show properly? On your right there will be a white stripe.
    What do I have to change in Muse? (I do not want to create a seperate phone design.)
    Other improvements would also be appreciated 
    Thank you for your time.
    Kind regards,
    Nephor

    Hi Nephor
    Please check if there is any empty text frame or rectangle placed on right side of the page as it will cause the page to stretch thus space will appear.
    https://forums.adobe.com/message/6098206
    Thanks,
    Sanjit

  • Fiscal Year / Periods does not show properly in WebI and compunding

    Hi,
    I have few reports where I am using Fiscal Year /Period as filter.
    I have created a Universe on the top of a SAP BI Query and did not do any customization.
    Then I created a WebI report. In this report I created various filters beside Fiscal Year / Period. When I run report, filter window opens. I can select all other filters but when it comes to Fiscal Year / Period it does not show me the values I want to see. It shows AUG 0001, APR 0025 etc. I want to see AUG 2010, MAR 2009 etc so that I can select them and get the data of the required Fiscal Year / Period. In Cube I have the required data. If I select MAR 0010 etc I donu2019t get any data.
    On the other hand if I put fiscal Year / Period in columns or rows it shows the right value.
    If also run SAP BI Query and Fiscal Year / Period in Variable then on variable screen I can see the right value from where I can select and get the required result.
    Do I have to do any step at Universe level or something else?
    It seems that Fiscal Year / Period is compounding.
    Is there any help?
    Thanks
    Bashir Awan

    Ingo,
    for thanks for igniting my thoughts in this regards.
    Yes these values do exist in SAP BW.
    It is some how compunding the values at filter level.
    It does not let me see the whole value when filter screen popup in BOBJ.
    In SAP whole value shows when variable screen popup, I see three columns Fiscal Year / Period. Text, Posting Period Key, and Posting Year Key.
    Fiscal year / Period Text which shows Aug 2009, Posting Period Key which shows our period 1 to 16, and Fiscal year key which shows 2009 etc.
    Is there any setting in BOBJ which compunds the year for variable screen so that we may see the whole values for filters?
    thanks

  • Equation not showing properly in word 2013

    Hello,
    I have a problem with my MS Word 2013. It seems that when i want to use the equation, under the design ribbon at the equation tools, there's few options for the structures (eg: fractions, script etc.). If you can see there's drop down button for each of
    the options. For instance if you click the fraction drop down, it will have a few kind of fraction to choose but in my case when i click the drop down button, nothing is shown. The slot for each type is there but it does not show the picture so it is hard
    for me to use it. But when I use MS PowerPoint 2013, it seems to be working. It is really weird.
    I tried a few things to solve this but nothing solve this problem for me. Here are a few things that I already tried:
    Repair MS Office 2013 in the installation setup
    Uninstall MS Office 2013 and re-install
    Install Office Compatibility Pack
    None of the above solve the problem. Can anybody help me solve this please? I have no idea what to do anymore.
    See attached picture to see what I explained about and understand my problem better.

    Hi,
    If the Building Blocks template file that comes with Microsoft Word is corrupt, it may cause Equations to not work correctly. To resolve this problem, move the damaged copy of the Building Blocks template out of the user data folder. After you do this,
    Word creates a new Building  Blocks template by using the default content. 
    To do this, please follow:
    1. Exit all Office programs.
    2. Open the file explorer and navigate to:
    C:\Users\%username%\AppData\Roaming\Microsoft\Document Building Blocks\1033\15
    Note: 1033 is the locale identification (LCID) number for English U.S version of Microsoft Office. For a list of locale ID numbers, see
    Locale identification numbers for language-specific files.
    3. Rename the Built-In Building Blocks.dotx
    file to Built-In Building Blocks.old.
    4. Then, navigate to
    C:\Program Files\Microsoft Office\Office15\Document Parts\1033\15
    5. Rename the Built-In Building Blocks.dotx file to
    Built-In Building Blocks.old.
    6. Close both folders.
    7. Now, click Start, click Run, type
    appwiz.cpl, and the click OK.
    8. In the Currently installed programs list, right-click the version of the Office that is installed on the computer, click
    Change, click Repair, and then click Continue.
    9. Restart Word to check the result.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Stock not showing properly in  for Batch determination

    Dear Gurus,
    While doing the following msg appearing since JAN 01, 2008, IN BATCH DETERMINATION THE SYSTEM NOT SHOWING EXACT QUANTITY AS IN ACTUAL STOCK
    Pls help for this issue,
    Regards,
    Atul

    Dear  Jagdish,
    In MMBE in unrestricted use column there is total 16.979 stock position is there and again for posting ( PGI ) after delivery for selecting batch determination Available Qty is showing 9,999,999,999.000
    How I will correct it could not understand.
    Regards,
    Atul

  • Fonts are not showing properly when opened through mail?

    When sending a PDF via email the Frutiger font does not appear properly on an iPad or iPhone. When viewed on an iPhone all the text appears as gradient boxes and when viewing on an iPad font becomes too light to be legible. Is this a problem with the font in the iOS platform? I also tried opening the file in iBooks and got the same outcome.

    Does disabling hardware acceleration have a positive effect or is it still happening?
    https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration

  • Airport express name change, not showing properly in iTunes

    I needed to swap the location of two Airport Express units, and I renamed them accordingly. They show up properly within Airport Utility/OS X, but within iTunes they seem to be cached to their old names. How do I reset them, flush the cache, or simply get them to show properly within iTunes?

    I had the same problem and finally worked it out!
    Go to the _AirPort Utility_, click on the *Airport Express*, click the *Manual Setup* button and click on the Music icon at the top. You'll see the "iTunes Speaker Name", which relates to the name in iTunes...

  • Japanese font "MS PGothic" not showing properly in linux machine

    Hi,
    I am using this font "MS PGothic" in my swings application to display Japanese font,
    But in SOME of the linux machines, it is not displayed properly
    linux os : Red Hat linux Enterprise edition 5.0.
    Do I need to install some packages for MS PGothic font to get installed in red hat linux.
    please help.
    Regards,
    bt

    You can get the TTF file and put it in your project, so will not have to care about system configuration.
    Good luck

  • Monotype sorts not showing properly

    I have used Monotype sorts in Numbers for years. Now with the new improved Numbers 3.0.1 it fails to show properly. Instead of the usual checkmark I just get a "3". Why is this happening.
    Thanks for any help you can give.

    Ah,
    I usually use the checkmark unicode character from here:
    http://en.wikipedia.org/wiki/Tick_(check_mark)
    you can just select the check mark from the text of the page and paste it into the cell.
    you can also use it in a formula like this:
    =if(A1=B1, "✓", "")
    You can also get a variety of special characters from the Characters dialpog box by opening with the menu item "Edit > Special Characters...":

Maybe you are looking for

  • Reading the data from a swing GUI

    If a I a form which accepts the Name and address and, user enters the data and clicks okay, how do I get the data in the listener class. For example , the way you get all the data in form on the server side in HTTP . Is there way to have all the data

  • Problem with iTunes and external drive

    I moved my files to an external hard drive months ago but apparently forgot to uncheck the auto synch button.  It seems that I just managed to copy them all back to my computer hard drive where I now only have 6gb.  Since I originally moved the files

  • Can you delete one song at a time on the ipod shuffle 4th generation?

    can you delete one song at a time from ipod shuffle 4th generation?

  • Can't install new version of iTunes or uninstall all of old version

    i posted this yesterday and saw it posted later but now my post is gone so here we go again. i can down load the application but wheni run the installer it quits and throughs up a message saying something like "can't delete old version of apple softw

  • Receiver FTP channel showing error

    I am facing some bizarre error even though my target directory for target ftp location is correct I checked all the parameters but didnt find out the issue. I have attached the screenshot for Receiver file channel. Please help and do reply. Below is