Zoom problem(help needed urgently please )

friends,
i m working on a class in which there is one JPanel inside a JInternalFrame. i have functionalities like zoomin and zoomout. for that i m writing my code on mouse clicked of JPanel but my problem is that mouseClicked method is getting called several times even if i click once on JPanel and thus zooming the JPanel by a very large value.
please help me if u have any solution for it.Its very urgent.

You are still crossposting.
It would be a waste of everyone's time to answer you here, since quite likely others have already helped you elsewhere.

Similar Messages

  • Zoom problem (help needed urgently)

    friends,
    i m working on a class in which there is one JPanel inside a JInternalFrame. i have functionalities like zoomin and zoomout. for that i m writing my code on mouse clicked of JPanel but my problem is that mouseClicked method is getting called several times even if i click once on JPanel and thus zooming the JPanel by a very large value.
    please help me if u have any solution for it.Its very urgent.

    it would be difficult to post complete code so i m posting the important part of my code related to this zoom problem.
    public class PaintPanel extends JPanel implements MouseListener
         public Rectangle normalShape;
         public int initialX =0;
         public int initialY = 0;
         public int finalX = 0;
         public int finalY = 0;
         protected void paintComponent(Graphics g)
    addMouseListener(this);
    super.paintComponent(g);
    scale = zoomvalue;
    // System.out.println("scale value is " + scale);
    Graphics2D g2d = (Graphics2D) g;
    AffineTransform at = g2d.getTransform();
    AffineTransform atnew = new AffineTransform();
    atnew.scale(scale,scale);
    at.concatenate(atnew);
    // g2d.setTransform(at);
    g2d.setTransform(at);
    public void mouseClicked(MouseEvent e)
    // get the position of mouse released
    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    finalX = e.getX();
    finalY = e.getY();
    temploc3 = finalX;
    temploc4 = finalY;
    if(WellPlot.zoomFlag)
    System.out.println("zoomvalue in mouseClicked " + zoomvalue);
    zoomvalue += 0.1 ;
    setZoom();
    return;
    }

  • BPM Workflow Help Needed Urgently please

    Hi All,
    We are working on a BPM workflow
    User A submits the request which goes to User B for review if rejected by user B the process stops but if approved then the amount is calculated using a decision table and based on the amount it will be routed to the respective users.
    I did it till BPM part and created rules in the BRM part as well but dont know how to call this BRM in BPM.
    Please help me its very very urgent.
    Thanks in advance

    Refer step 25 of this document to see how to create a web-service for your BRM ruleset.
    Once the web service is ready, it can be imported anywhere for use.
    1. In your BPM, right-click on the 'WSDL' folder and select 'Import WSDL'. You can import your BRM web-service here.
    2. Then place an automated activity in your BPM process design and set the BRM service as the Service Reference property of the Automated activity.
    3. Once this is done, you will see the Condition and Action values of your BRM decision table in the Input and Output mapping of the Automated Activity.
    4. Map the values of BPM process context to the BRM condition values in the 'Input Mapping' and get the corresponding output in Output mapping (Action Values of decision table).
    Refer step 12 in this document to see how to import a WSDL in your BPM Process.
    Hope this helps.

  • Design pattern help need urgently please

    Hi I need you to tell me if the following code looks like its a facade or not?
    The method make the table calls another method in the class project4
    which contains instances of itself and student class and supervisor class and the method prints out data from these classes.
    Iv to hand this in tomorow and would like to know
    Is that a facade or not?
    Please help
    public class TableFacade
         TableFacade()
         System.out.println("This is the table of projects");
         public Project4 makeTheTable()
              Supervisor5 sup = new Supervisor5();
              Project4 project =new Project4();
              project.readRelevantProjectsFromFile(sup);
         return project;
    }

    Sorry to be continuously replying but desperate times call for desperate measures anyway
    Im trying to adapt from my project4 class
    is this in the adaptor pattern?
    class AdaptProject
         Project4 project;
         Supervisor5 supervisor;
         void readProjectDetails()
              project.readProjectDetails();
         void readRelevantProjectsFromFile(Supervisor5 v)
              project.readRelevantProjectsFromFile(supervisor);
         String projName()
              return project.projName;
         String projSubject()
              return project.projSubject;
    }

  • High CPU usage on all cores by ntoskrnl.exe? Help needed urgently Please.

    ntoskrnl.exe, system, has multiple cores running with high usage, locking up my system when using programs.
    After looking through the forums I did the following:
    I ran
    sfc /scannow but nothing found. 
    I used process Explorer to find that the system has a thread <ntoskrnl.exe!TtlSid HashLookup+0x 1ffc> that
    is using up 40+% of all four cpu cores. Looks like a driver fault with 8.1, but cannot pinpoint the device. Any clues msg me. 
    I have created an etl file that contains usage data. this is present here:
    https://dl.dropboxusercontent.com/u/8554814/highCPUUsage.zip
    Would be a lot of help if this can be resolved. please help.

    forgot to ask, may I know your PC model?
    mostly is related to the network, networking software, or software which need internet connection
    did you already updated all the network driver?
    is there any networking software or downloaded software? may I know your antivirus status? firewall?
    try clean boot and go to safemode to check, choose safe mode only, safe mode with networking and normal mode without internet (unplug cable or disconnect Wifi)

  • Help needed urgent please ( parallel port access in linux)

    hi all, i am trying to read and write data to /from the parallel port , i am running IBM j9 vm on linux.under /dev there are lp0..lp3 parport0..parport3, and port devices , i dont know which one to use , i have tried all , they all return with an ioexception saying "cannot find the file" except for port device which does not generate any error but it does not return what i have written on it ,
    any help would be much appreciated.
    i am using fileoutputstream and printwriter calsses .
    i dont want to use javax.comm api cause i think its incompatible with ibms visual age micro edition ( the one i am using ) so i would prefer something that works with my IDE .
    thanks
    yahya
    [email protected]

    However, there is an on-going OpenSource version called "RXTX" (http://jarvi.ezlink.com/rxtx/) that works quite well. Be sure to read all the documentation that comes with it, as you'll need to set some permissions on the ports you want to use.

  • Problems Help needed URGENTLY

    Hi
    I have today updated to the latest software for my Nokia 5800 V 31.0.101 and now the ringtones and images that were pre installed seem to have gone also the facebook icon and games. I have tried to reinstall the software again but this did not work and also tried a hard reset on the phone this did not work either. 
    Please can you let me know if there is anyway to get these things back?  Also is there anyway to downgrade back to the verison I was using before?

    yes it will. also, if you don't like it, you can try on of these (one of them is the actual default facebook client) : http://store.ovi.com/content/6B505CF11830BD92E040050A85326355
    The old firmware may have come bundled with different games, melodies and applications, however the default firmware configuration doesn't come with these stuff, that's why you're experiencing these problems now.  But you can try browsing thru the Ovi Store, you might find the same old applications once again, for free, of course. Good luck!
    If, from time to time, I actually give a good advice, please click on the Kudos icon, I have cookies and free hats!

  • Help needed urgently please!!!!!!

    hi
    there i am running windows xp pro 64 bit . Using Premiere Elements7. when i connect with firewire to load video from camera it all looks impeccable on screen as it loads. Once i stop loading and Premiere renders it (i guess) all of a sudden the video looks granny and pixalated and stays that way even after i export it on dvd.Hope spme one can help me please.Thank you in advance.

    i have a Sony hvr-hd 100u i shot the video in dv mode i dont understand why
    it gets granny after i load it onto PE7 i hope u can help me figure this out lol
    thanks again

  • Nokia 6300 help needed urgently please

    My friends 6300 phone has been trodden on by a large horse and has since stopped working - well it would really. But unfortunately she had not got the connectivity package for her laptop and had saved all the info on her phone rather than her sim. I have tried connecting it to my software but it comes up with USB device not recognised. My own 6300 and 6310 work fine so I know the Nokia pc suite is working fine. Is there any way we can get this info out she has phone numbers in there that she will never be able to get again.

    i hear you, i have been in this situation many times, hence now almost neurotically i have several back up files, and online back up providers to keep my most prescious data safe. still does not change the fact that it is frustrating when things like this happen that noone couldhave predicted. hope you get it sorted out and be able to find this data in other ways.....
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • HT201210 i have an error of no 11. kindly help, needed urgently

    i have an error of no 11. kindly help, needed urgently
    when i try to upgrage my
    iphone 3gs wit 4.1 to new latest 5.1
    it gives the erorr of 11. what that mean? Reply as soon as you can !
    thnx

    Error -1 may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.

  • Some J2ME midlets doubts!! help needed urgently!!!

    Hi,
    I am currently working in a company where it does wireless technology like WAP and I am assigned a task of creating a screensaver midlet. I have some doubts on the midlets.
    1) How do i use a midlet suites? From what I heard from my colleagues & friends, a servlet is needed for midlets to interact with one another. is it true?
    2) How do I get the startin midlet to take note the phone is idling so that the screen saver midlet can be called?
    Help needed urgently... if there is any source codes for me to refer to would be better... Thanks...
    Leonard

    indicates that MIDlet suites are isolated (on purpose) from each other, so you can't write over another one's address space.
    Also, I believe (at least on cell phones) that you have to specifically enter the Java Apps mode; unless you do the app won't execute. If you are in Java apps mode and a call comes in, the cell's OS puts the Java app currently executing on "Pause" mode and switches back to phone mode.
    Not sure if you will be able to have a Java app do that automatically.
    BTW why do you need a screensaver on an LCD display? Is it really intended to show an advertisement?
    Download and real all the docs you can from Sun, once you get over the generic Java deficiencies MIDlet's aren't that hard.

  • Load bar at start up, then shut down. HELP NEEDED URGENTLY!!! plss....

    Load bar at start up, then shut down. HELP NEEDED URGENTLY!!! plss..

    The startup disk may need repairing.
    Startup your Mac while holding down the Command + R keys so you can access the built in utiliites to repair the startup disk if necessary or restore OS X using OS X Recovery

  • Help needed urgently on a problem..plzzz

    hi..this is a linear congruential generator. I have to implement it and i need the execution time for the program.
    for your understanding i'm providing an example below.
    Xn=(( a* xn-1 )+b) mod m
    If X0=7 ; a = 7 ; b =7 ; m=10
    Then
    X0 = 7
    X1 =((7 * 7) + 7))mod 10 = 6
    X2 = ((6*7)+7))mod 10 = 9
    X3 = ((9*7)+7) mod 10 = 0
    X4 = ((0*7)+7) mod 10 = 7
    Now since the cycle is being repeated i.e 7 appears again�so the period is 4 coz there are 4 diff nos. i.e 7,6,9,0�..
    help required urgently....your help will be appreciated...thankyou..

    Hi,
    I wrote the code so that it catches any cycle (not only the "big" one).
    Otherwise it will enter infinite loop...
    The time complexity is O(N*logN): it can do at most N iterations (here N is your 'm'), and in each iteration there can be O(log N) comparisons (since I maintain TreeSet).
    Interesting issue: is it possible to supply such (x0, a, b, m) tuple such that all possible values from 0 to m-1 will be output? I think no :)
    Here is the program:
    package recurr;
    import java.util.TreeSet;
    import java.util.Comparator;
    public class Recurrences {
         private static long x0, a, b, m;
         private static TreeSet theSet;
         public static void main(String[] args)
              long l0, l1, l2, l3;
              try {
                   x0 = Long.parseLong(args[0]);
                   a = Long.parseLong(args[1]);
                   b = Long.parseLong(args[2]);
                   m = Long.parseLong(args[3]);
              } catch(NumberFormatException nfe) {
                   nfe.printStackTrace();
              System.out.println("X[0]: " + x0 + "\n");
              long curr = x0;
              boolean cut = false;
              int i;
              // initialize the set
              theSet = new TreeSet(new LongComparator());
              // we can get at most m distinct values (from 0 to m-1) through recurrences
              for(i=1; i <= m; ++i) {
                   // iterate until we find duplicate
                   theSet.add(new Long(curr));
                   curr = recurrence(curr);
                   if(theSet.contains(new Long(curr))) {
                        cut = true;
                        break;
                   System.out.println("X[" + i + "]: " + curr + "\n");
              if(cut) {
                   System.out.println("Cycle found: the next will come " + curr + "\n");
              } else {
                   System.out.println("No cycle found!");
              System.out.println("----------------------------------");
              System.out.println("Totally " + (i-1) + " iterations");
         private static long recurrence(long previous)
              return (a*previous + b)%m;
         static class LongComparator implements Comparator
              public int compare(Object o1, Object o2)
                   if(((Long)o1).longValue() < ((Long)o2).longValue()) {
                        return -1;
                   } else if(((Long)o1).longValue() > ((Long)o2).longValue()) {
                        return 1;
                   } else return 0;
    }

  • Help Needed Urgently - Payment Problem!

    Hi all,
    I have tried to purchase a couple of apps and I keep getting an error message (below) and yet, both times I received a confirmation sms on my phone telling me that my credit card had been charged the amount! I have re-entered my payment information and my account info and everything and it still doesnt work, even though the payment works just fine apparently as the money is getting deducted with no problem.
    How do I solve this and how do I (a) make the apps that I purchased work without repurchasing again OR (b) get my money back.

    hishamsaidi wrote:
    Hi please I can't purchase by me visa card it is telling Me error 12000 from app world thanks
    Hi and Welcome to the Community!
    Here is a KB that discusses that error:
    KB28978 "Error ID 12000" is encountered when attempting to complete a purchase on a BlackBerry device
    Hopefully it contains something useful! There also are multiple existing threads on this site that discuss that exact error...your review of those might prove useful, and a search of this site, using the error message, error code, or symptom, should reveal all applicable existing threads to you.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Help needed urgently -Had a power (electricity) failure at re-installation

    I need your help in  fixing this BIG problem. I had an app reset which required me to re-install my 8900 Os. In the process of installation. Having gotten to the level where it says Do not disconnect your device..
    Loading JVM and the system application window
    waiting for device initialization
    A colleague of mine trying to resolve some issues with his printer mistakenly Pull my power cable off
    I tried starting all over again but the system would not recognize the phone and could not even come up with the com port number>
    the phone blinks intermittently too.
    How do I resolve this issue.
    Thank you

    Hi and Welcome to the Forums!
    Two possibilities for you:
    http://crackberry.com/blackberry-101-lecture-12-how-reload-operating-system-nuked-blackberry
    http://forums.crackberry.com/f3/how-wipe-jl_cmder-53502/
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

Maybe you are looking for

  • Slow scrolling

    When I'm on a doc page or an internet page,  the scrolling is very slow.  I heard that it may be the video driver is the wrong one or not installed.  I checked that and the driver is not installed.  I used the msi exe driver installer and it seems li

  • LE7 / Kontakt 2

    I've recently bought Kontakt 2 & Kontakt Experience to use with LE7, but cpu drain is crippling my PB. Am thinking of buying desktop, not sure whether to go for new iMac G5 2ghz or sell a limb & buy Powermac G5 dual 2.3ghz. Is anyone out there runnin

  • Elements 9 serial number limit

    Have had two computer crashes recently and replaced my computer. I have orinal E9 discs and number but after upgrading Elements tells I have reached my limit for installing the program and need to buy another one??? What's with this?? Can I get a ser

  • Seach help

    how to add a new field in the search help exit which is not a part of the selection method??..explain with an example

  • What i want is when i run bsp application automatically is should open with

    Hi friends, In BSP when we run a application the browser will open. When it open if i want to full screen i have to press F11. What i want is when i run bsp application automatically is should open with fullscreen -F11. How to code this in BSP. Pls s