Re: Java Images and Threads prob Help!!

Without going through it in detail the problem may be that you're doing the repaint which you hope will draw the image before the image has completed loading.
Create your ImageIcon (loading the "xxxx.jpeg" files) during program initialisation. And check the load status of the icon, at least in a test version.

I still cant get the reqd output. Only the 1st image is dispayed and when i click the second code, the 2nd image doesnt come(the first one does not disappear, and even when i click the code 1 i have to minimize/ maximize the screen, to get the image and after that it does not go for the s2nd image 2 come!! )
Create your ImageIcon (loading the "xxxx.jpeg" files) during program >>initialisation. And check the load status of the icon, at least in a test version. How do u load the image during initialization??? and can ny1 plz tell me how to get the flashing threads with msgs????

Similar Messages

  • Lost my iPhone 6 Plus images and I need help getting them back.

    I may just have to go to the apple store, but I am going to see if anyone out here can help me out.
    Oct 31st I transferred my SIM from my iPhone 5S to a new iPhone 6 Plus. On December 7th(ish) my new iPhone decided that it would no longer focus on anything that was more than one foot away.
    I was hoping that it would fix itself but it never did. So I went to the Apple Forums and there were some people suggested that wiping out the phone and restoring the system would help.
    Before I wiped out my phone I did a back up. After the phone restored all the images and information came back. The camera started working for a couple clicks then stopped. I wiped out my phone three maybe four more times and it each time the images came back I even wiped out and set it up as a new iPhone and wiped back out and restored with my iCloud and the image still came up!!! ... but the focusing would not work for more than a couple of clicks.
    On December 12 I took it into the iPhone store they said I'd needed a replacement one. Before we removed the "find my phone" and wiped out the device we made sure the phone was backed up. Because I had over  5,500 images on my phone I didn't wait around the store to make sure they all popped up and went home.
    When I got home the phone only showed the 4,200 images I had taken with my iPhone 5S up to October 31st!!! However, under my settings my replacement iPhone 6 Plus shows 5,500 images but I cannot locate them.
    The other thing that is odd is that all my "shared images" from October 31st to December 12th that I took with my 6 Plus are still showing up as well as the ones that I sent via which leads me to think that they are lost out in the iCloud Universe somewhere.
    When logged on to my iCloud.com account it would only allow me to see what is on my current iPhone 6 Plus which includes the images before October 31st and the images I have taken since the iPhone 6 Plus. I cant see any of the images that are on my iPad that are set up under the same account, but it let's me see the icon for the iPad and it also shows me the icon for my other 6 Plus. However, the iCloud website will not allow me to click on the two icons and look at the images.
    I believe that after 30 days from December 12th those images will probably by default be deleted from the iCloud system and I want to make sure that I get them back before they do.
    I understand that apple changed the layout of the images and I did go and look at all my albums... so this not the case.
    I can see my back up from Dec. 9 and Dec 12th and have tried to do the restore on this phone the text and the contacts pull up but the images do not.
    Someone please help me out. I have all the images from our recent Disney World Vacation in there and I would really like to have them back.

    cuz me too same case I have also I lost all my photos 800pics

  • JDK 1.6 on Solaris. Multiple java processes and thread freezes

    Hi, we've come across a really weird behavior on the Solaris JVM, reported by a customer of ours.
    Our server application consists of multiple threads. Normally we see them all running within a single Java process, and all is fine.
    At some point in time, and only on Solaris 10, it seems that the main Java process starts a second Java process. This is not our code trying to execute some other application/command. It's the JVM itself forking a new copy of itself. I assumed this was because of some JVM behaviour on Solaris that uses multiple processes if the number of threads is > 128. However at the time of spawn there are less than 90 threads running.
    In any case, once this second process starts, some of the threads of the application (incidentally, they're the first threads created by the application at startup, in the first threadgroup) stop working. Our application dumps a list of all threads in the system every ten minutes, and even when they're not working, the threads are still there. Our logs also show that when the second process starts, these threads were not in the running state. They had just completed their operations and were sleeping in their thread pool, in a wait() call. Once the second process starts, jobs for these threads just queue up, and the wait() does not return, even after another thread has done a notify() to inform them of the new jobs.
    Even more interesting, when the customer manually kills -9 the second process, without doing anything in our application, all threads that were 'frozen' start working again, immediately. This (and the fact that this never happens on other OSes) makes us think that this is some sort of problem (or misconfiguration) specific to the Solaris JVM, and not our application.
    The customer initially reported this with JDK 1.5.0_12 , we told them to upgrade to the latest JDK 1.6 update 6, but the problem remains. There are no special JVM switches (apart from -Xms32m -Xmx256m) used. We're really at a dead end here in diagnosing this problem, as it clearly seems to be outside our app. Any suggestion?

    Actually, we've discovered that that's not really what was going on. I still believe there's a bug in the JVM, but the fork was happening because our Java code tries to exec a command line tool once a minute. After hours of this, we get a rogue child process with this stack (which is where we are forking this command line tool once a minute):
    JVM version is 1.5.0_08-b03
    Thread t@38: (state = IN_NATIVE)
    - java.lang.UNIXProcess.forkAndExec(byte[], byte[], int, byte[], int, byte[], boolean, java.io.FileDescriptor, java.io.FileDescriptor, java.io.FileDescriptor) @bci=168980456 (Interpreted frame)
    - java.lang.UNIXProcess.forkAndExec(byte[], byte[], int, byte[], int, byte[], boolean, java.io.FileDescriptor, java.io.FileDescriptor, java.io.FileDescriptor) @bci=0 (Interpreted frame)
    - java.lang.UNIXProcess.<init>(byte[], byte[], int, byte[], int, byte[], boolean) @bci=62, line=53 (Interpreted frame)
    - java.lang.ProcessImpl.start(java.lang.String[], java.util.Map, java.lang.String, boolean) @bci=182, line=65 (Interpreted frame)
    - java.lang.ProcessBuilder.start() @bci=112, line=451 (Interpreted frame)
    - java.lang.Runtime.exec(java.lang.String[], java.lang.String[], java.io.File) @bci=16, line=591 (Interpreted frame)
    - java.lang.Runtime.exec(java.lang.String, java.lang.String[], java.io.File) @bci=69, line=429 (Interpreted frame)
    - java.lang.Runtime.exec(java.lang.String) @bci=4, line=326 (Interpreted frame)
    - java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)There are also several dozen other threads all with the same stack:
    Thread t@32: (state = BLOCKED)
    Error occurred during stack walking:
    sun.jvm.hotspot.debugger.DebuggerException: can't map thread id to thread handle!
         at sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal.getThreadIntegerRegisterSet0(Native Method)
         at sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal.getThreadIntegerRegisterSet(ProcDebuggerLocal.java:364)
         at sun.jvm.hotspot.debugger.proc.sparc.ProcSPARCThread.getContext(ProcSPARCThread.java:35)
         at sun.jvm.hotspot.runtime.solaris_sparc.SolarisSPARCJavaThreadPDAccess.getCurrentFrameGuess(SolarisSPARCJavaThreadPDAccess.java:108)
         at sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.java:252)
         at sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:211)
         at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:50)
         at sun.jvm.hotspot.tools.JStack.run(JStack.java:41)
         at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
         at sun.jvm.hotspot.tools.JStack.main(JStack.java:58)I'm pretty sure this is because the fork part of the UnixProcess.forkAndExec is using the Solaris fork1 system call, and thus all the Java context thinks all those threads exist, whereas the actual threads don't exist in that process.
    It seems to me that something is broken in UnixProcess.forkAndExec in native code; it did the fork, but not the exec, and this exec thread just sits there forever. And of course, it's still holding all the file descriptors of the original process, which means that if we decide to restart our process, we can't reopen our sockets for listening or whatever else we want to do.
    There is another possibility, which I can't completely rule out: this child process just happened to be the one that was fork'd when the parent process called Runtime.halt(), which is how the Java process exits. We decided to exit halfway through a Runtime.exec(), and got this child process stuck. But I don't think that's what happens... from what I understand that we collected, we see this same child process created at some point in time, and it doesn't go away.
    Yes, I realize that my JVM is very old, but I cannot find any bug fixes in the release notes that claim to fix something like this. And since this only happens once every day or two, I'm reluctant to just throw a new JVM at this--although I'm sure I will shortly.
    Has anyone else seen anything like this?

  • Java swing and threading issue

    i am trying to update swing components from some thread. at my first try, i noticed this was a disaster. upon further research, i found out about the single-threaded model of swing events (i.e. event dispatching thread).
    i did more research and could NOT find a good example on how to update swing components from other threads. many examples were showing too much.
    can someone post a simple example on here? i just want to see how to properly update a swing component from a non-swing class using threading.

    I think its a simple example:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=621226
    Let us know what you think.

  • Java inheritance and interface code help required

    please help me I need your 30 mins only,,, working on assignment and I am trying to understand interface and inheritance might not need even 30 mins, please add me on skype *[deleted by moderator]*
    Or add me on
    yahoo msgr *[deleted by moderator]*
    waiting for your help.
    I have no single person friend or I can ask help from who knows java or programming. pretty much want to learn need a friend who can guide me in java.
    unfortunately have to submit assignment tomorrow.
    Thank you in advance for your time and consideration.
    Akee
    *Edited by moderator: EJP on 10/11/2012 10:38: removed your private contact details. This is a public forum, not a personal help desk. Ask your questions here or not at all.*

    Hi,
    there are lot of thread alredy posted please serach
    check following link
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/1d753cab14a909e10000000a11405a/frameset.htm
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Links of blogs on java mapping...
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    blog
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping(file to xslt mapping)
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners(xslt with java enhancement function)
    Regards,
    Amit

  • Logging Java objects and threads. Application sampling.

    I am using a laptop to run my application on. It uses windows XP and it is the only application running on that machine. I use TCP and serial port to communicate to other devices. My application is supposed to use up to 300M of memory but apparently it using much more than that. The laptop physical memory size is 512M. I am wondering if there is a way to sample my application periodically. What I mean by that is, after the applications runs I want to run at the same time kind of profiler that every, let us say, 10 minutes logs the number of objects created and what those objects are or what the current ones are. The number of threads running and what are their names. I want to know what is using all of this memory. The memory usage goes up to about 420M. As a result, the application throws out of memory exception. I believe I can get the number of threads running but do not know how to get their names. I need to know all of that so I would go into my code and see where it is happening and try to solve the problem. One of the ways I have in my mind now is to put a print out everywhere I create an object or thread, but that�s very expensive. Any hints or tips could be useful.
    Thank you in advance.
    P.S.:
    I do not want to run a profiler such as JProfiler because the application is running live and I do not have access to it. I want to embed these logs into the application itself and rerun it on a live system.

    As a first thought, I'm guessing that you're merely thinking that your program will not exceed 300 megabytes just based on the -Xmx300M command you may be passing your program. This is a max heap size, not the max footprint your program will take. Be aware that this can go beyond the scope of 300 MB....
    Now, if you want very detailed information about processes, memory usage, etc, you might be able to keep track of it yourself, but if you want this information from a system-level sort of thing you will not get it, as one of the major points of Java is that it does not care about a lot of system specifics.
    Now, if you're really interested in keeping track of threads, I don't see why you could not just write to a log file every time you spawn a new thread of a particular kind.

  • New t410 image and repair discs help

    First i want to say thanks to everyone for being so helpful.  i've a had a few other questions that you guys have helped me on. 
    i just got my t410 and i am about to make some repair and/or recovery discs.  First of all, when i choose "create system image" from control panel, I get 3 drives to backup:  System_drv, Window 7 os (C, and Lenovo Recovery (Q.  by default, lenovo recovery is NOT selected, should I select it to back that up as well?  What effect will it have on the repair discs that I am going to create afterwards?  And will it effect me reimaging onto a SSD?
    PS. I know some of you guys are on notebookreview, where also posted something similar.  if you've already read this bear with me. 

    "the warranty is still in date, so will getting a new battery be free if i send it in?"
    If your iPod is over 180 days old, they may charge you a $30 handeling fee, but other than that, yes.
    "do they give you just a different ipod mini if you send it in for repair of the battery, if so are they brand new or used?"
    They'll most likely send you a refurbished mini.
    "do they actually ask you?"
    That one, I don't know. Never needed to find out.
    "can you be refused a service of the battery?!!!"
    Yes. If you battery lasts more than half its advertised life, it is within what Apple considers to be acceptable performance and they may refuse service. Also, if your iPod shows signs of excessive physical damage, Apple may refuse service.
    If you're really only getting two hours, I would definately send it in.
    Good luck!
    -Bryan

  • 19 items on a menu and each has text, image and price. HELP???!!!

    I have a UITableView with a menu on it. I would like to have a description, picture, title and price for each item. there are 19 items so i figured that creating 19 views in the storyboard would not work. Is there a way of doing this? I have the head first iphone development book and it has an app almost the same as mine called DrinkMixer but it is using xcode 3.1 not 4.2. Please help.
    iCrazy23

    Go to the iOS Dev Center - download the UICatalog sample and see these links:
    iOS Human Interface Guidelines
    iOS Starting Point
    Xcode 4 User Guide ; Xcode Basics Help
    App Development Overview
    iOS App Development Workflow Guide

  • Image and table size help

    Hey all:
    I'm obviously new to Dreamweaver MX, and I've been having
    quite a problem with my banner at the top of my site. Using
    photoshop, I made a banner and tried to put it at the top of my
    site. However, when I inserted the image, the image doesn't fit and
    leaves a white space around the image...it doesn't fit into the
    table. So what I had to do is make the background color in that
    specific cell black so it looks like the entire banner fit into the
    table. But I want to change the banner so it's a better designed
    image, but I know that no matter what I do, the image will not fit
    the cell perfectly. How can I do this?
    The site is: www.tudortastic.com
    Thanks!
    -H

    A table cell will expand to exactly contain an inserted image
    assuming
    the table's cellpadding and cellspacing are both set to zero
    and you
    have not specified an oversized height or width.
    "HappyHelen" <[email protected]> wrote in
    message
    news:eksu5e$4n6$[email protected]..
    > Hey all:
    >
    > I'm obviously new to Dreamweaver MX, and I've been
    having quite a problem
    > with
    > my banner at the top of my site. Using photoshop, I made
    a banner and
    > tried
    > to put it at the top of my site. However, when I
    inserted the image, the
    > image
    > doesn't fit and leaves a white space around the
    image...it doesn't fit
    > into the
    > table. So what I had to do is make the background color
    in that specific
    > cell
    > black so it looks like the entire banner fit into the
    table. But I want
    > to
    > change the banner so it's a better designed image, but I
    know that no
    > matter
    > what I do, the image will not fit the cell perfectly.
    How can I do this?
    >
    > Thanks!
    > -H
    >

  • Ipod camera black screen when opened and sync prob HELP!!!

    hello i just went to open the camera on my ipod touch 4g and it just went black just a black screen when i press the home button it goes straight to the home screen everything else is fine i just open the camera and a black screen appears, it is working fine now but just wondering if it is faulty or somthing.
    some times it does not sync i will plug it into the computes usb port and it wont charge i takes about 3 to 6 tries to get it to work any help thanks 

    Same thing just happened to me, found another solution though. 
    Plug the USB cable into your PC/base of iPod Touch.
    Turn off the iPod completely.
    Wait 10 seconds and re-power the iPod.
    Now load up the camera; and the screen should be back to normal.
    I have similar screen freeze issue with my Sony Erricson K700i Mobile phone, and plugging in the 'power' cable always resolves it, so it would seem to be of the same method used to resolve this iPod issue!!
    Strange thing as you've posted, all other apps etc still work.  Maybe support will get around to resolving this bug!! 

  • Undo after flattening image and closing file - Help...

    My friend was working really hard on multiple files - he's been using PS for years - made a mistake by actually saving a psd file that he flattened and then closed the file.
    Is there anyway to get that back? 
    His back up and timemachine are not working... so that is not an option.
    Thanks!
    Tim

    It's a mistake everybody makes  —   once.
    Recreating it never takes as long as creating it, if that's any consolation.
    Edit: The history log might help a bit if he had it checked in preferences.

  • Image and Jquery issues - help needed

    Let me begin by saying that I have used both of these successfully with pages on my test server and in production.  That said, for whatever reason Dreamweaver is not displaying images called-out in my CSS in either Live View or in browser preview even though they are visible in Design View.  I also can't get jquery slide shows to function in browser preview either - and again the images show up in Design View.  Does this have to do with the fact that I am building this site on my hard-drive and not on a test server?  Has anyone experienced this and then moved their root to a test or production server and had them magically work?

    localhost...
    Image links are (example):
    CSS:
    a.classname {
            width: 60px;
            height: 60px;
            background: transparent url(/images/YouTube_pop.png) no-repeat 0 0;
            float: right;
    HTML:
    <p><a href="http://www.webaddress.com/user/blahblahblah" target="_blank" class="classname"></a></p>
    or
    HTML:
    <img src="images/sld_g04.gif" /> - which shows the images fine in both Live View and browser preview.

  • Java image and byte[]

    I am having trouble writing and reading data from an image. I am using the following code to get the bytes for a picture.
    BufferedImage pic = ImageIO.read(new File(picture));
    WritableRaster writableRaster = pic.getRaster();
    DataBufferByte buffer = (DataBufferByte)writableRaster.getDataBuffer();
    byte[] picBytes = buffer.getData();After making some changes I would like to write the new bytes to a file. This seems to work as the new picture shows the changes when I look at it.
    File newFile = new File("C:/NewPic.jpg");
    ImageIO.write(pic,"jpg",newFile);However, when I try to read the newFile using the same method as above I do not get the same bytes. I am using the following code to print the bytes in hex to verify what they are.
    BufferedWriter out2 = new BufferedWriter(new FileWriter("pix2.txt"));
    for(int x=0; x<picBytes.length; x++)
    out2.write((Integer.toString(picBytes[x] & 0xff, 16).toUpperCase()+" "));
    }This produces:
    7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
    7F 7F 7F 7F 7F 7F 7F 7F 7F 7F FF FF 7F FF FF FF
    for the bytes that I have made the changes to, and when I try to read from the newly created file I get:
    82 7F 7A 82 7F 7A 82 7E 7D 82 7E 7D 82 7D 7F 82
    7D 7F 82 7B 82 82 7B 82 AC A5 AC B4 AE B3 E0 DA
    but there is nothing wrong with the picture. Do I need to create a new BufferedImage before I save, or what could be causing this change?

    Hmmm... I'm not sure what you are doing or what your goal is, but are you aware that JPEGs tend to use a losey compression?

  • Java GUI and runtime().exec help

    I have been working on a GUI that does an assortment of tasks. The final and last task is to make copies of a 3dModel conversion program and a script file that is required to make the converter run and convert. The converter and the script file are moved to a user specified directory. The user specified directory contains all of the models that will be converted. The problem is, I can't get the GUI to boot the converter with the script file. To make the converter work, you need to pass two window's cmd commands but the commands need to occur from the same directory as the converter and script file. This is what I have tried to do:
    String[] commands = new String[]{"cmd ",
    "/c ",
    "cd ",
    smdDirectory.getPath(),
    "skmodel ",
    "model_definition.txt "};
    try{               
    Process child = Runtime.getRuntime().exec(commands);}
    catch(IOException e){}The files have all ready copied to the correct directory. All I need is for the GUI to execute the "skmodel model_definition.txt" commands in the correct directory. What am I doing wrong?
    Thanks for the help in advance.

    String[] commands = new String[]{"cmd ",
    "/c ",
    "skmodel ",
    "model_definition.txt "};
    try{               
    Process child = Runtime.getRuntime().exec(commands, null, smdDirectory.getPath());}
    catch(IOException e){}I will try that and see if I get the desired results.
    EDIT:
    I got it to make. Here is the code.
    String[] commands = new String[]{"cmd ", "/c ", "skmodel",     "model_definition.txt "};
         try{
              Runtime runtime = Runtime.getRuntime();               
              Process child = runtime.exec(commands, null, smdDirectory);
    }Edited by: Euphoria on Sep 28, 2008 9:48 AM

  • A good book or a Tutorial about java Imaging

    Hello. I am new to java imaging and i was wondering if there is a good book or e-book or a tutorial that can help me learn about image processing. Do you have any suggestions? Thanx

    You can try this link ....
    hope it will help u a lot....
    http://www.javalobby.org/articles/ultimate-image/

Maybe you are looking for

  • How to run (user)config.xml to add Fonts in embedded FOP 020.5 with PDF

    Hi, we are having problems with showing certain PDF characters, resulting in # (ÂăãÆæßČč¢ results in Â#ãÆæß##¢). Within the (user)config.xml you can add Fonts, see code, but how to run it from the XSQLFOPSerializer ????. We copied the Arial Window fo

  • Airport Extreme 802.11n gone after firmware update

    Started Airport Utility earlier today, just to check a password. An Apple window came up offering new firmware, 7.1.1, I think. I usually accept these offers without thought, so I let the update run. Now Airport Utility cannot detect the Airport Extr

  • BAPI for CRM - CRMD_ORDER

    Hi, I am using PI to integrate the third party system to our CRM system.At receive side, i am seeing for  a BAPI to call and to create transaction (CRMD_ORDER) in CRM.Can you please help me in identifying the correct BAPI for this requirement, Thanks

  • Vendor Document Details

    Hie guys i have a requirement to retrive the details of documents made against vendors..i have been trying to use the following FM's but none of them is giving me my desired result. I need an FM that can give me the same details as transaction FB03.

  • Inserting swfs in ASP include files, CS4?

    I'm having a problem inserting SWFs into ASP include files in CS4 and am wondering if there's a solution other than going back to CS3. I've been adding pages to this site on a daily basis and at some point a few years ago we needed to start using ASP