After changing deprecated methods in Thread Class

I have changed the deprecated methods suspend() and stop() with JDK1.2.2 methods wait() and thread = null respectively. I wanted to know the affects after changing when I actually run the application.

For one thing, "thread = null" won't stop the thread. In fact it will have no effect on the thread at all.

Similar Messages

  • Why won't Candy Crush allow me to purchase an advance to the next section after changing my method of payment?

    I usually always use an itunes card to buy the new section once I've completed all the levels. I didn't have enough money one time when I wanted to buy a boost, so on my phone, I changed my method of payment from none to a credit card. After the purchase was made, I deleted my credit card information and set it back at done. I have sufficient funds to buy this advance, but it says they need a method of payment in order to confirm the purchase. What do I do?

    I had similiar problems with my itunes account and after some searching found a response that helped me - perhaps it will help you also...
    It has to do with the cookie settings in Safari (of all things!)
    https://discussions.apple.com/thread/3559322?start=0&tstart=0
    I had the problem where when I started up itunes I was constantly prompted for my password regarding something about "automatic downloads". No matter how many times I typed it in, the prompt would just keep re-appearing (I tried about 8-10 times).
    When I tried to resolve the issue (based on another thread) by viewing my itunes account (in the top left drop down window where your user name is), I was getting odd messages about "make sure the date is correct", and itunes would not let me view my account.
    By turning OFF the option to block ALL cookies in Safari, the problem(s) have gone away.
    Open Safari - go to prefs - click on Privacy tab - make sure "block cookies" is set to "from third parties..."
    Good luck.
    key search terms:
    can't log into itunes
    sign in to view account
    can't access account in itunes

  • Problem with getState() method in Thread class

    Can anyone find out the problem with the given getState() method:
    System.out.println("The state of Thread 1: "+aThread.getState());
    The Error message is as follows:
    threadDemo.java:42: cannot resolve symbol
    symbol : method getState ()
    location: class incrementThread
    System.out.println("The state of Thread 1: "+aThread.getState())
    ^
    1 error

    the api doc shows Since: 1.5
    You do use Java 5...if not... it's not available.

  • Unluck apple-id after changing payment method

    Hello,
    I changed my method of payment to creditcard after a failed transaction with Clickandbuy, but my Apple-ID is still locked. How will I change this?
    Thanks

    Contact iTunes store support: http://www.apple.com/emea/support/itunes/contact.html.

  • Deprecated method in Environment class

    Weblogic recommends the following method calls to open a secure connection to a
    server, however the setSSLClientCertificateFromServer method has been removed
    since 4.5. What is the replacement, and if there is none, what is the work around?
    thanks,
    Bob
    Environment e = new Environment();
    e.setProviderUrl("t3s://server2.weblogic.com:443");
    e.setSSLClientCertificateFromServer();
    e.setSSLServerName("server2.weblogic.com");
    e.setSSLRootCAFingerprints("ac45e2d1ce492252acc27ee5c345ef26");
    e.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
    Context ctx = new InitialContext(e.getProperties())

    Did you try whacking your subject into google? You should. The thrid result was:
    http://java.sun.com/j2se/1.5.0/docs/api/deprecated-list.html

  • Deprecated methods in java.lang.thread

    Hi,
    I am getting the followng warning message when i run my code:
    The method void stop() in class java.lang.Thread has been deprecated,
    can anyone suggest an alternative method to the deprectaed stop method, i can't seem to find one.
    Thanks in advance

    The stop() method in thread has been deprecated because it is inherently dangerous. The suggested action now is to simply modify a variable inside the thread to tell it to stop running, and the thread should periodically check the variable to see when it should stop. There's good description of why stop() and a few other methods in Thread have been deprecated at..
    http://java.sun.com/j2se/1.4/docs/guide/misc/threadPrimitiveDeprecation.html

  • Calling a method in a class extended from thread

    I'm trying to use two threads of type ThreadTest to call the addNum method in the class below. I found that i couldnt call the addnum method with the instances I created but had to make the addnum method static and then call it with the class name ThreadTest.Is there anyway to get round this? i'm doing this exercise to try and understand synchronisation. Thanks
    import java.lang.Thread;
    import java.util.*;
    class ThreadTest extends Thread implements Runnable{
         private int x;
         private static ArrayList intnumbers = new ArrayList();
         public ThreadTest(int no)
              x=no;
         public void run()
              for (int i=0; i<x; i++)
                   try
                   System.out.println(i);
                   Thread.currentThread().sleep((long)(Math.random() * 1000));
              }catch(InterruptedException e ){e.getMessage();}
         public static void addNum(int n)
              synchronized(intnumbers){
                        intnumbers.add(new Integer(n));
    public static void main(String[] args)
         Thread  testThread = new Thread(new ThreadTest(50));
         Thread  testThreadb = new Thread(new ThreadTest(50));
         testThread.start();
         testThreadb.start();
              ThreadTest.addNum(10);
        //*** this gives an error
        //testThread.addNumber(10);
        //testThreadb.addNumber(10);
    }

    ok here goes again. ;).
    import java.lang.Thread;
    import java.util.*;
    class ThreadTest extends Thread implements Runnable{
         private int x;
         private static ArrayList intnumbers = new ArrayList();
         public ThreadTest(int no)
              x=no;
         public void run()
              for (int i=0; i<x; i++)
                   try
                   System.out.println(i);
                   Thread.currentThread().sleep((long)(Math.random() * 1000));
              }catch(InterruptedException e ){e.getMessage();}
         public static void addNum(int n)
              synchronized(intnumbers){
                        intnumbers.add(new Integer(n));
    public static void main(String[] args)
         Thread  testThread = new ThreadTest(50);
         testThread.start();
         //gives error so how can i create 2 instances of testThread and call addNum with them?
         //testThread.addNum(10);
    //works ok but I want to call addNum with 2 different threads
         ThreadTest.addNum(10);
    }

  • Change method check_consistency in class:cl_hrrcf_app_e_ext_appl_data_m

    Hi friends,
    i try to edit method and when i choose: enhancement implementation -> create
    it write to me:
    in this mode, you can create implementation only
    what can i do to change the method?
    thanks,
    dana.

    Assuming you have gone into the method and switched on "Enhance" (ctrl+F4) then do the following:
      Edit->Enhancement Operations->Show Implicit Enhancement Operations
    From here you will see a line at the top and bottom of the method where you can add you pre or post enhancement.  Select one of these lines and do:
      Edit->Enhancement Operations->Create Enhancement
    I suspect before you had not shown the Implicit operations
    Thanks,
    Pete Devereux

  • "Safe" delete of Thread class from a Vector

    I need to be able to delete a thread class object from a vector.
    1) Is it safe to do so immedately after calling xyz.stop() ?
    2) If so, does Java clean all the thread stuff up automatically ?
    3) If not, is there something else I should do to clean up?

    The stop method of class Thread is deprecated, however it's still possible to stop this thread. A thread's memory should become available for garbage collection the moment it is no longer executing, and it is no longer being reffered to.
    To stop your thread, you need to set a boolean flag that is available to it to false:
    Thread myThread = new Thread()
         public boolean stopRunning = false;
         public boolean threadComplete = false;
         public void run()
              while(!stopRunning)
                   doSomething();
              threadComplete = true;
    }If you are doing something involving blocking I/O inside your thread, you're going to need to interrupt the thread after setting this public flag to true in order to get it to stop executing.
    Then you can simply remove it's refference from that Vector, and it will become elligable for Garbage collection the moment it becomes inactive.
    -Jason Thomas.

  • Cannot change payment method on subscription and C...

    I am posting the transcript for the 45 minute chat I just suffered through. I simply needed to change my credit card as the old card had been replaced due to a security breach. Others on forums have complained about this issue but this is a stellar example of Skype's poor business and customer service practices. You are now chatting with 'Laarni M'. Laarni M: Hello! Welcome to Skype Live Support! My name is Laarni. Laarni M: If incase we got disconnected, simply click on the Chat Support Link and you will be reconnected to us in no time. Laarni M: https://support.skype.com/support_selection. Laarni M: With that being said, how may I help you? [Removed for privacy]: I need to update my credit card information because the credit card I have on file is expired. The update payment page does not give me the option to enter a new credit card. I started to delete my old card so I could add a new one, but I got an error message saying I must cancel my subscription before removing my credit card. Laarni M: Oh! [Removed for privacy]: I have a subscription already. [Removed for privacy]: I have had it for years. Laarni M: I am sorry to hear that you are having problems with updating your credit card. Laarni M: I will be glad to help you with this. Laarni M: To start with, can I have your Skype name and your name so that I can address you properly? [Removed for privacy]: I have already entered that information to begin this chat. It is required. Laarni M: I understand. [Removed for privacy]: the Skype name is [Removed for privacy] and my first name is [Removed for privacy] Laarni M: I just need to verify it. Laarni M: Thank you, [Removed for privacy]. Laarni M: Nice to meet you. Laarni M: Let me just pull up your account. Laarni M: Anyway how's your day so far? [Removed for privacy]: OK, I have found it. Apparently I am forced to buy Skype credit in order to change my payment to a new method? This is ridicuous. Laarni M: I am now pulling up your account, [Removed for privacy]. Laarni M: Thank you for waiting. Laarni M: Yes, that is correct. In order to change your payment method you need to either wait for your subscription to expire so you can purchase using the new card or you can buy Skype Credit. [Removed for privacy]: Now that I have bought 10.00 of skype credit and added the new payment information that way, it is appearing in my payment settings and I can delete the old card. But again, this is the only way to add a new payment method, which is very wrong. Laarni M: I am sorry if you feel this way, [Removed for privacy]. [Removed for privacy]: Oh, just lovely. I just tried to delete the old card and I have the same error message that "this card is being used to fund your Unlimited US and Canada 12 months. If you want to delete this card you have to cancel your subscription first." Is this some kind of nasty way of forcing me to lose my unlimited subscription? Laarni M: I see. Laarni M: Because the best way to add a new payment details is for you to let the subscription linked to the credit card expire first. Laarni M: After that, you can reactivate your subscrption using the new credit card. Laarni M: That is the best thing that I can recommend, [Removed for privacy]. [Removed for privacy]: I went into change payment settings and changed the payment method to the new card. The page saved and said it had changed the setting. But then I went back in and it had not. It still defaults to the old card. I still get the "cancel subscription" message when I tried to delete the old card again. Laarni M: Yes, [Removed for privacy]. [Removed for privacy]: I can't let it expire or it won't pay for my subscription in August. Anyway the card will not expire. It was replaced due to a security breach at the issuing bank. Laarni M: Because you really need to let your subscription expire first by cancelling it before you update your card. Laarni M: I see. [Removed for privacy]: Why would I want to do that when I probably won't be able to get the same plan? I have had that unlimited plan for years. [Removed for privacy]: I am certainly not cancelling that plan. Laarni M: I understand, [Removed for privacy]. [Removed for privacy]: This is really insane, you know. One should easily be able to update payment information when a card needs to be changed. [Removed for privacy]: I had this same problem last year, but there was a workaround. If you do not know what the current workaround is then please transfer me to a supervisor who does.l Laarni M: I understand, [Removed for privacy]. [Removed for privacy]: I doubt that you do understand. Since the forums indicate this is an ongoing problem, I am forced to assume this situation is intentional and is a way of forcing people to give up older and less expensive plans, and that you are fully aware of that. Laarni M: I am sorry but as much as I want to help you, we can't do anything but to let the subscription expire first by cancelling it before you update the credit card. [Removed for privacy]: I need to speak to a supervisor, please. Laarni M: I am sorry but as of the moment, my supervisor is engaged to a different activity. [Removed for privacy]: I am sorry but that is not the case. That is just what you have been told to say. I can continue to open new chats and waste representative's time for hours, or you can arrange for me to communicate with a supervisor. Laarni M: I am sorry for the inconvenience caused you. info: Your chat transcript will be sent to [Mod edit: Please do not include personal/private information when making a public post. Thanks!] at the end of your chat. Laarni M: I understand that it is really important for you ad upon further checking, we can try this step that may work for you. Laarni M: Do you have another browser aside from the one that you are using right now? [Removed for privacy]: Yes, I do Laarni M: Great! Laarni M: Internet Explorer would be the best. Laarni M: Can you please open it and go the link that I will provide to you? [Removed for privacy]: It is already open, please send the link Laarni M: Alright. [Removed for privacy]: I still do not have the link. Laarni M: Once you click on the link, and click Skype credit, please do not forget to click the change payment method when you buy Skype credit. [Removed for privacy]: I still do not have the link Laarni M: I am sorry for the delay, I am just having a system error as of the moment. Laarni M: But on your end, you can go to the page where you can buy Skype credit. Laarni M: By the way, there are 2 cards saved on your account. Laarni M: May I know the last 4 digit of the card that you want to use? [Removed for privacy]: 1591. And yes, I already explained to you that I bought Skype credit (which I do not need as I have a subscription!!) just to add the new credit card. Laarni M: I see. Laarni M: I can delete first the old credit card saved on our system. [Removed for privacy]: Please do that, but do NOT delete or cancel my subscription when you do this. Laarni M: Alright, [Removed for privacy]. Laarni M: Thank you for patiently waiting, [Removed for privacy]. [Removed for privacy]: I hope that what you are doing is successful. Laarni M: Please hang on, [Removed for privacy] as we are still doing some workaround for this. Laarni M: We are also getting an error doing this. [Removed for privacy]: That is not confidence-inspiring. Laarni M: I am sorry if you feel this way. [Removed for privacy]: I imagine that anyone would feel that way. Laarni M: Thank you for waiting, [Removed for privacy]. Laarni M: Here's what we can do to help you now, [Removed for privacy]. Laarni M: We really need to cancel your subscription so it will cancel the recurring payment. Laarni M: This does not mean that the subscrition will be cancelled. Laarni M: You can still use your subscription until the end of the billing period. Laarni M: So once we cancel your subscription now, you can try to go to the payment settings and update your credit details. Laarni M: Is everything okay? Haven't heard from you in a while. [Removed for privacy]: I am sure that you realize this is unacceptable. I am very surprised that you would suggest this as a solution. As I stated above, I am well aware that this is a method Skype is using to force people to give up better subscriptions. I will not be forced to accept a suboptimal subscription by this method. I am also aware that a supervisor can correct this problem in the system by hand. Please put me in communication with a supervisor. Also--I have ALREADY updated my credit details as I explained above. You or a supervisor simply need to change the subscription payment method to the new card that is already on file. Laarni M: I understand where you are coming from, [Removed for privacy]. Laarni M: But I am trying to help you with giving the best solution for this. [Removed for privacy]: We are going in circles. I have been on this chat for 45 minutes trying to get a simple payment method change that with any other company, I could do by myself online in two minutes. You are not offering me any kind of solution at all. You are insulting my intelligence by claiming that the payment method cannot be replaced. Laarni M: I am sorry if you feel this way, [Removed for privacy]. [Removed for privacy]: Please stop this. The system is clearly set up to block a payment change. A supervisor can override this and that is what I expect you to arrange. Laarni M: But as of the moment, there is no available supervisor. [Removed for privacy]: Please do not tell me things that are not true. [Removed for privacy]: Please connect me with a supervisor. Laarni M: And If I will transfer you to my supervisor, he will give the same information that I provided to you. Laarni M: This is because it is the only workaround for this, [Removed for privacy]. Laarni M: You do not need to worry, cancelling your subscription is just cancelling the recurring payment or auto renewal. [Removed for privacy]: He may, but if he does, he will also be stating something that is not true. It is always possible for a supervisor or manager to make changes in the system. Laarni M: You can still use your subscription until the end of the billing period. [Removed for privacy]: I'm sorry, but in August when the billing period ends, I will receive notification that my subscription has cancelled due to non-payment and that I must choose a new plan. That is what I do not want. Therefore your solution is unacceptable. I have stated this clearly. Laarni M: I am sorry [Removed for privacy], I really want to help you but this is only the work around or soultion that we can do. [Removed for privacy]: Then apparently after 8 years, I will be searching for new phone service. I am very sorry that this is the case. Laarni M: If the auto renewal will cancel, you can still reactivate your subscrition and that time, the new payment method will be use for that subscription. [Removed for privacy]: Do I have your word that I will be allowed to keep the same plan with no changes to my subscription? Laarni M: Yes, [Removed for privacy]. You can still reactivate the same subscription. Laarni M: You do not need to wory about this. [Removed for privacy]: If that is not the case I will be cancelling. And Skype needs to change its payment method practices. This is very poor customer service. I will be going on every forum I can find and posting a poor review of the service. This is a shame since I have been a loyal Skype customer for more than 8 years. I was a customer when Skype was the only internet phone company in business. info: Your chat transcript will be sent to [Mod edit: Please do not include personal/private information when making a public post. Thanks!] at the end of your chat. Laarni M: I am sorry if you feel this way, [Removed for privacy]. Laarni M: Thnak you for being loyal with Skype.

    Well, it happened again.  This time I'm done with Skype.  A ten-year customer, and they've finally worn me down and worn me out.  Yes, after 30 minutes of constant escalation, requesting a supervisor, and finally threatening to walk, they offered another annual contract at 6 cents more a year.  But at the cost of making me sign up all over again, and after wasting my time both last year and this year.  And I am DONE.  I will use my remaining Skype credit for the few online teaching video conferences I have to do, but no more subscriptions.  Bye, Skype.  I would provide adjectives for how horrible your customer service is, but they would all be profane.
    Transcription of today's chat:
    Close chat
    info: at 18:59:56
    Please wait for an agent to respond. You are currently '1' in the queue.
    info: at 19:01:56
    All agents are currently assisting others. Thank you for your patience. An agent will be with you shortly. You are currently '1' in the queue.
    info: at 19:01:58
    Privacy Statement 
    You are now chatting with 'Gian C'.
    Gian C: at 19:02:11
    Hello! Welcome to Skype Live Support! My name is Gian. If incase we got disconnected, simply click on the Chat Support Link and you will be reconnected to us in no time.https://support.skype.com/support_selection .
    Gian C: at 19:02:11
    With that being said, how may I help you?
    Customer: at 19:02:24
    I chatted with an agent 2 days ago re: failure to apply my credit card to my subscription. He said it was taken care of and my online account should show the subscription renewed in 24 hours. it is still not renewed.
    Gian C: at 19:02:41
    I am sorry to know that
    Gian C: at 19:02:47
    What is your Skype name?
    Customer: at 19:03:49
    customer
    Gian C: at 19:04:04
    Thanks
    Gian C: at 19:04:08
    Let me check the account
    Gian C: at 19:05:50
    Thank you for patiently waiting
    Gian C: at 19:06:07
    Is this for the Unlimited Us and Canada?
    Customer: at 19:06:13
    yes
    Gian C: at 19:07:12
    I see
    Gian C: at 19:07:23
    Can you go to this site right now?
    Customer: at 19:07:30
    i'm there
    Gian C: at 19:07:33
    http://www.skype.com/en/
    Gian C: at 19:07:39
    https://www.skype.com/en/rates/?nu=subs-calling
    Gian C: at 19:07:49
    Look for Unlimites Us and Canada
    Customer: at 19:07:58
    why?
    Gian C: at 19:08:21
    Just want to make sure if repurchasing the subscription would be avaialble
    Customer: at 19:08:36
    I was told last year that it would be available. And two nights ago.
    Gian C: at 19:08:36
    That is the best work around to get the subscription back using the new card details
    Gian C: at 19:08:45
    I understand
    Gian C: at 19:08:53
    Can you please go and check it first
    Customer: at 19:08:59
    No, thank you. Please just apply my card. This is what happened last year.
    Gian C: at 19:09:02
    So I can assure the resolutiong
    Customer: at 19:09:34
    The subscription shows that it expires today. It is on my account. Simply renew it with the card information that is also on my account.
    Gian C: at 19:09:40
    Can you help me on this to solve your issue please?
    Gian C: at 19:09:53
    I understand
    Customer: at 19:10:02
    You have directed me to your sales site to search for the plan I already have all over again. I have no time for this.
    Gian C: at 19:10:06
    However the time you change the card did not worked on the system
    Gian C: at 19:10:15
    That is why the renewal did not push trough
    Customer: at 19:10:41
    It didn't work last year either because the system is a mess. But a rep fixed it last year. If you cannot do this please pass me to a supervisor.
    Gian C: at 19:10:59
    ok.
    Gian C: at 19:11:19
    Before we do that, can you please try to check if the subscription is available first.
    Customer: at 19:11:40
    I do not understand how you expect ME to check if a subscription is available!
    Customer: at 19:12:04
    The subscription is ON MY ACCOUNT AND SAYS IT NEEDS TO BE RENEWED.
    Gian C: at 19:12:09
    Basically it is simple
    Gian C: at 19:12:10
    Go to this website
    Gian C: at 19:12:10
    https://www.skype.com/en/rates/?nu=subs-calling
    Gian C: at 19:12:10
    Click on U.S.
    Customer: at 19:12:16
    Please pass me to a supervisor.
    Gian C: at 19:12:20
    Then check if US and Canada is part of the list
    Gian C: at 19:12:39
    Before I pass you to our supervisor
    Gian C: at 19:12:47
    Let me give you a heads up on your case
    Customer: at 19:12:57
    it is there for $2.99 per month. I have a locked in annual charge for that subscription for $29.99. Not $36.00.
    Gian C: at 19:13:11
    I see
    Gian C: at 19:13:28
    Thanks for the information
    Gian C: at 19:13:38
    When did you change your card detail? For this subscription?
    Customer: at 19:15:08
    Last year. At which time the system refused to remove the earlier invalid card and charge the 2nd (correct) one. This year the system allowed me to remove the old card. The rep 2 days ago told me the card was fine. When I looked at the detail this evening, the expiration date was missing, so I filled it in. The rep said NOTHING about this two days ago. Frankly I think Skype is trying to sabotage my re-order to try to force me off of my annual plan and onto a monthly. I will not do it.
    Gian C: at 19:15:13
    Thanks
    Gian C: at 19:15:48
    Just to make sure we will be solving this issue, can you please provide me your call back number
    Customer: at 19:15:59
    You do not need to call me.
    Gian C: at 19:16:07
    Just incase this chat got disconnected so our supervisor can call you
    Customer: at 19:16:19
    (###) ###-#### (REDACTED FOR PRIVACY)
    Gian C: at 19:16:25
    Let me get you our supervisor as you have requested
    Gian C: at 19:16:29
    Thank you
    Customer: at 19:25:17
    ?hello
    Gian C: at 19:27:42
    I will get back to you once the Supervisor is ready to take this chat. For a moment
    Gian C: at 19:27:50
    Sorry to keep you waiting
    Gian C: at 19:28:08
    Our Supervisor is still engaged with the call
    Gian C: at 19:28:10
    Anyway
    Gian C: at 19:28:20
    Here is what we have found out on the subscription
    Gian C: at 19:28:41
    The renewal has passed already, so we can't renew it manually other than repurchasing the subscription
    Gian C: at 19:28:54
    Checking the price of the subscription
    Customer: at 19:28:59
    It has not passed yet. it expires 5/7. Today is 5/6.
    Gian C: at 19:29:12
    Let me give you a heads up
    Gian C: at 19:29:39
    Auto-renewal only happens once. And that is 3 days before the subscription expire
    Customer: at 19:30:09
    I give up. This is done. No subscription. Of any type. And I have been a Skype customer for over 10 years. Goodbye.
    Gian C: at 19:30:23
    I am sorry if you feel that way
    Gian C: at 19:30:34
    I am explaining to you all the things you need to know
    Gian C: at 19:31:27
    But you refused to listen nor cooperate. As much as I wanted you to get your subscription back. However it is within your call if you want to follow my advised to get this resolved quickly
    Gian C: at 19:31:47
    The new subscription prices is just 30.50USD for 1 year
    Gian C: at 19:32:12
    It is just few cents higer compare to the old price $29.99
    Gian C: at 19:32:37
    I hope that won't be a problem for you to get the 12 months subscription for the Unlimited US and Canada.
    Customer: at 19:32:51
    This is flatly ridiculous. The rep 2 days ago told me this was taken care of. Now you tell me it is not, keep me on chat for 30 minutes, make me look up subscription prices on your OWN website, and then tell me my subscription has expired when it has not. Yet I am the one being called uncooperative.
    Gian C: at 19:33:02
    If the auto renewal failed because of card used
    Customer: at 19:33:05
    That is a problem. I will not resubscribe. I don't care that it is only 6 cents a year more.
    Gian C: at 19:33:21
    Then Repurchasing the same subscription will be best to get it back
    Customer: at 19:33:30
    That is not why. If Skype did not have the information required I should have received an early email. I got SEVEN EMAILS IN ONE DAY INSTEAD.
    Customer: at 19:33:42
    The 7th one said the subscription was cancelled.
    Gian C: at 19:34:05
    That is the notification sent by Skype to tell you that we are still trying to accept the payment
    Customer: at 19:34:30
    It makes no sense to notify a customer every two hours on a SINGLE day, but not before.
    Gian C: at 19:34:33
    6 times the sytem try to renew the subscription
    Customer: at 19:34:43
    Yes. ON the same day. None on any other day.
    Gian C: at 19:35:01
    If only there is no problem with your card then the subscription should renew without a problem
    Customer: at 19:35:10
    You expect people who are at work to sign in from their work PC for personal business and renew within 8 hours. Ridiculous.
    Gian C: at 19:35:08
    Yes correct
    Customer: at 19:35:12
    I am done.
    Gian C: at 19:35:10
    As I said
    Gian C: at 19:35:30
    3 days before the subscription expire is the only day to renew the subscription automatically
    Gian C: at 19:35:32
    That is how the system works
    Customer: at 19:35:34
    As I said, the rep 2 days ago told me the card was fine but would take 24 hours for teh change to apply to the syste.
    Gian C: at 19:35:37
    It is part of the terms of use
    Customer: at 19:35:43
    Read what I said.
    Gian C: at 19:36:01
    Yes I already documented this case and I already escalated those previous representative
    Gian C: at 19:36:08
    For providing you false information
    Customer: at 19:36:12
    The terms of use don't say you bombard people with emails every 2 hours on a single day.
    Customer: at 19:36:44
    And then cut them off at the end of the day. When their subscription has not even expired yet. And then tell them it's their own fault their card didn't work. When they were told it was fine.
    Gian C: at 19:36:50
    The email notification is our way to make sure customer will be notified that they need to renew the subscription to avoid this kind of issue
    Customer: at 19:37:07
    Then why not send it once a day for six days instead?
    Customer: at 19:37:13
    that would make a lot more sense!
    Gian C: at 19:37:38
    Here is the thing Kim the system works that way for 10 years already
    Gian C: at 19:38:12
    And only few customers are having this kind of issue, common issue was cause by problem with the card associated to the subscription.
    Customer: at 19:38:18
    See this? this was last year:
    Customer: at 19:38:20
    http://community.skype.com/t5/Rates-and-subscripti​ons/Cannot-change-payment-method-on-subscription-a​...
    Gian C: at 19:38:26
    Ok
    Customer: at 19:38:45
    You'll get an update on that thread, believe me. Which will make it clear why I'm done with Skype.
    info: at 19:38:52

  • Problem using repaint() method from another class

    I am trying to make tower of hanoi...but unable to transfer rings from a tower to another...i had made three classes....layout21 where all componentents of frame assembled and provided suitable actionlistener.....second is mainPanel which is used to draw the rods n rings in paintComponent.....and third is tower in which code for hanoi is available...i had made an object of mainPanel at layoout21 n tower but i m not able to call repaint from tower..gives an error : cannot find the symbol....method repaint in tower.
    code fragments od three classes are:
    LAYOUT21
    class layout21 extends JFrame implements ActionListener
    { private Vector rod1 = new Vector();
    private Vector rod2 = new Vector();
    private Vector rod3 = new Vector();
    private String elem; //comment
    public String r22;
    public boolean in=false;
    public int count=0; //no of times the transfer to other rods performed
    private int r3,rings; // current no of rings
    private JComboBox nor,col;
    private JLabel no;
    private JLabel moved;
    private JLabel no1;
    private JButton start;
    private JButton ref;
    private AboutDialog dialog;
    private JMenuItem aboutItem;
    private JMenuItem exitItem;
    private tower t;
    final mainPanel2 p =new mainPanel2();
    public layout21()
    { t = new tower();
         Toolkit kit =Toolkit.getDefaultToolkit();
    Image img = kit.getImage("java.gif");
    setIconImage(img);
    setTitle("Tower Of Hanoi");
    setSize(615,615);
    setResizable(false);
    setBackground(Color.CYAN);
         JMenuBar mbar = new JMenuBar();
    setJMenuBar(mbar);
    JMenu fileMenu = new JMenu("File");
    mbar.add(fileMenu);
    aboutItem = new JMenuItem("About");
    aboutItem.addActionListener(this);
    fileMenu.add(aboutItem);
    exitItem = new JMenuItem("Exit");
    exitItem.addActionListener(this);
    fileMenu.add(exitItem);
    Container contentPane =getContentPane();
    JPanel bspanel = new JPanel();
    JPanel bnpanel = new JPanel();
    setBackground(Color.CYAN);
         //JComboBox
    nor = new JComboBox();
    nor.setEditable(false);
    nor.addItem("3");
    nor.addItem("4");
    nor.addItem("5");
    nor.addItem("6");
    nor.addItem("7");
    nor.addItem("8");
    nor.addItem("9");
    bspanel.add(nor);
    col = new JComboBox();
    col.setEditable(false);
    col.addItem("BLACK");
    col.addItem("GREEN");
    col.addItem("CYAN");
    bspanel.add(col);
    JLabel tl = new JLabel("Time");
    tl.setFont(new Font("Serif",Font.BOLD,12));
    bspanel.add(tl);
    JTextField tlag = new JTextField("0",4);
    bspanel.add(tlag);
    start =new JButton("Start");
    bspanel.add(start);
    ref =new JButton("Refresh");
    bspanel.add(ref);
    JButton end =new JButton("End");
    bspanel.add(end);
    start.addActionListener(this);
    nor.addActionListener(this);
    col.addActionListener(this);
    ref.addActionListener(this);
    end.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    dispose(); // Closes the dialog
    contentPane.add(bspanel,BorderLayout.SOUTH);
    JLabel count = new JLabel("No of Transfer reguired:");
    count.setFont(new Font("Serif",Font.BOLD,16));
    bnpanel.add(count);
    no = new JLabel("7");
    no.setFont(new Font("Serif",Font.BOLD,16));
    bnpanel.add(no);
    JLabel moved = new JLabel("Moved:");
    moved.setFont(new Font("Serif",Font.BOLD,16));
    bnpanel.add(moved);
    no1 = new JLabel("0");
    no1.setFont(new Font("Serif",Font.BOLD,16));
    bnpanel.add(no1);
    contentPane.add(bnpanel,BorderLayout.NORTH);
    contentPane.add(p,BorderLayout.CENTER);
         String r = (String)nor.getSelectedItem();
    rings = Integer.valueOf(r).intValue();
    p.draw(rings,1) ;
    public void actionPerformed(ActionEvent evt)
    {  Object source = evt.getSource();
    if(source == start)
    r3 = Integer.valueOf((String)nor.getSelectedItem()).intValue();
    p.transfer(false);
    t.initialise(rod1,rod2,rod3,0);
    t.towerOfHanoi(r3);
         //repaint();
         if(source == ref)
    { rod1.removeAllElements() ;
    rod2.removeAllElements() ;
    rod3.removeAllElements() ;
    count=0;
              r3 = Integer.valueOf((String)nor.getSelectedItem()).intValue();
              p.draw(r3,1);
    p.transfer(true);
    no1.setText(""+0);
    p.trans_vec(rod1,rod2,rod3);
    t.initialise(rod1,rod2,rod3,0);
              System.out.println("");
              repaint();
    if(source == nor)
    { JComboBox j = (JComboBox)source;
    String item = (String)j.getSelectedItem();
    int ring1 = Integer.valueOf(item).intValue();
    int a=1;
    for(int i=1;i<=ring1;i++)
    { a = a*2;
    a=a-1;
    no.setText(""+a);
    p.draw(ring1,1);
    repaint();
    if(source == aboutItem)
    {  if (dialog == null) // first time
    dialog = new AboutDialog(this);
    dialog.setVisible(true);
    if(source == exitItem)
    {  System.exit(0);
         if (source==col)
         { JComboBox j = (JComboBox)source;
    String item = (String)j.getSelectedItem();
              repaint();
    TOWER
    class tower extends Thread
    { private Vector rod1 = new Vector();
    private Vector rod2 = new Vector();
    private Vector rod3 = new Vector();
    private int count ;
    private String elem;
    final mainPanel2 z =new mainPanel2();
    public void initialise(Vector r1,Vector r2,Vector r3,int c)
    { rod1 = r1;
    rod2 = r2;
         rod3 = r3;
         count =c;
    public void towerOfHanoi(int rings)
    for(int i=0;i<rings;i++)
    rod1.add(" "+(i+1));
    System.out.println("rod1:"+rod1.toString());
    hanoi(rings,1,2);
    public void hanoi(int m,int i, int j)
    if(m>0)
    { hanoi(m-1,i,6-i-j);
    if(i==1 && j==2 && rod1.isEmpty()==false)
    { count++;
    //no1.setText(""+count);
    elem = (String)rod1.remove(0);
    rod2.add(0,elem);
         //z.trans_vec(rod1,rod2,rod3);
    repaint(); //NOT ABLE TO USE METHOD HERE...WHY??
    //z.hanoi_paint();
    try
              this.sleep(2000);      
              catch (Exception e) { e.printStackTrace() ;  }
    System.out.println(count+". ROD 2:"+rod2.toString());
    if(i==1 && j==3 && rod1.isEmpty()==false)
    { count++;
         //no1.setText(""+count);
         elem = (String)rod1.remove(0);
    rod3.add(0,elem);
    //z.trans_vec(rod1,rod2,rod3);
    repaint();//
    // z.hanoi_paint();
                   try
              this.sleep(2000);      
              catch (Exception e) { e.printStackTrace() ;  }
    System.out.println(count+". ROD 3:"+rod3.toString());
    if(i==2 && j==1 && rod2.isEmpty()==false)
    { count++;
         //no1.setText(""+count);
         elem = (String)rod2.remove(0);
    rod1.add(0,elem);
    //z.trans_vec(rod1,rod2,rod3);
    repaint();
    //z.hanoi_paint();
    try
              this.sleep(2000);      
              catch (Exception e) { e.printStackTrace() ;  }
    System.out.println(count+". ROD 1:"+rod1.toString());
    if(i==2 && j==3 && rod2.isEmpty()==false)
    { count++;     
         //no1.setText(""+count);
         elem = (String)rod2.remove(0);
    rod3.add(0,elem);
    //z.trans_vec(rod1,rod2,rod3);
    repaint();
    //z.hanoi_paint();
    try
              this.sleep(2000);      
              catch (Exception e) { e.printStackTrace() ;  }
    System.out.println(count+". ROD 3:"+rod3.toString());
    if(i==3 && j==1 && rod3.isEmpty()==false)
    { count++;
         //no1.setText(""+count);
    elem = (String)rod3.remove(0);
    rod1.add(0,elem);
    //z.trans_vec(rod1,rod2,rod3);
    repaint();
    //z.hanoi_paint();
         try
              this.sleep(2000);      
              catch (Exception e) { e.printStackTrace() ;  }
    System.out.println(count+". ROD 1:"+rod1.toString());
    if(i==3 && j==2 && rod3.isEmpty()==false)
    { count++;
         //no1.setText(""+count);
    elem = (String)rod3.remove(0);
    rod2.add(0,elem);
    //z.trans_vec(rod1,rod2,rod3);
    repaint();
    //z.hanoi_paint();
    try
              this.sleep(2000);      
              catch (Exception e) { e.printStackTrace() ;  }
    System.out.println(count+". ROD 2:"+rod2.toString());
    hanoi(m-1,6-i-j,j);
    MAINPANEL
    class mainPanel2 extends JPanel //throws IOException
    public Vector line = new Vector();
    public Vector rod11= new Vector();
    public Vector rod22= new Vector();
    public Vector rod33= new Vector();
    public int no_ring;
    public int rod_no;
    String pixel;
    StringTokenizer st,st1;
    int x,y;
    public boolean initial =true;
    public void paintComponent(Graphics g)
    { System.out.println("repaint test");
    bresenham(100,60,100,360);
         bresenham(101,60,101,360);
    bresenham(102,60,102,360);
    bresenham(103,60,103,360);
    bresenham(104,60,104,360);     
    g.setColor(Color.BLUE);
    while(line.size()>0)
    { pixel = (String)line.remove(0);
    st = new StringTokenizer(pixel);
    x = Integer.valueOf(st.nextToken()).intValue();
    y = Integer.valueOf(st.nextToken()).intValue();
    g.drawLine(x,y,x,y);
    bresenham(300,60,300,360);
    bresenham(301,60,301,360);
    bresenham(302,60,302,360);
    bresenham(303,60,303,360);
    bresenham(304,60,304,360);     
    while(line.size()>0)
    { pixel = (String)line.remove(0);
    st = new StringTokenizer(pixel);
    x = Integer.valueOf(st.nextToken()).intValue();
    y = Integer.valueOf(st.nextToken()).intValue();
    g.drawLine(x,y,x,y);
    bresenham(500,60,500,360);
    bresenham(501,60,501,360);
    bresenham(502,60,502,360);
    bresenham(503,60,503,360);
    bresenham(504,60,504,360);     
    while(line.size()>0)
    { pixel = (String)line.remove(0);
    st = new StringTokenizer(pixel);
    x = Integer.valueOf(st.nextToken()).intValue();
    y = Integer.valueOf(st.nextToken()).intValue();
    g.drawLine(x,y,x,y);
    bresenham(0,361,615,361);//used to get a pixel according to algo.. . func not provided
    bresenham(0,362,615,362);
    bresenham(0,363,615,363);
    bresenham(0,364,615,364);
    bresenham(0,365,615,365);     
    while(line.size()>0)
    { pixel = (String)line.remove(0);
    st = new StringTokenizer(pixel);
    x = Integer.valueOf(st.nextToken()).intValue();
    y = Integer.valueOf(st.nextToken()).intValue();
    g.drawLine(x,y,x,y);
    if(initial==true)
    g.setColor(Color.RED);
    for(int i = no_ring;i>0;i--)
    { g.drawLine(100-(i*8),360-(no_ring - i)*10,100+(i*8)+5,360-(no_ring - i)*10);
    g.drawLine(100-(i*8),359-(no_ring - i)*10,100+(i*8)+5,359-(no_ring - i)*10);
    g.drawLine(100-(i*8),358-(no_ring - i)*10,100+(i*8)+5,358-(no_ring - i)*10);
    g.drawLine(100-(i*8),357-(no_ring - i)*10,100+(i*8)+5,357-(no_ring - i)*10);
    g.drawLine(100-(i*8),356-(no_ring - i)*10,100+(i*8)+5,356-(no_ring - i)*10);
    // draw for each rod
    //System.out.println("rod11:"+rod11);
    //System.out.println("rod22:"+rod22);
    //System.out.println("rod33:"+rod33);
         int r1 = rod11.size();
         int r2 = rod22.size();
         int r3 = rod33.size();
    String rd1,rd2,rd3;
    int r11,r12,r21,r22,r31,r32;
    if(initial == false)
         { g.setColor(Color.RED);
         while(rod11.size()>0)
    { r12 = rod11.size()-1;
              rd1 = (String)rod11.remove(r12);
    r11 = Integer.valueOf(rd1).intValue();
    g.drawLine(100-((r11+1)*8),360-(r1 - (r11+1))*10,100+((r11+1)*8)+5,360-(r1 - (r11+1))*10);
    g.drawLine(100-((r11+1)*8),359-(r1 - (r11+1))*10,100+((r11+1)*8)+5,359-(r1 - (r11+1))*10);
              g.drawLine(100-((r11+1)*8),358-(r1 - (r11+1))*10,100+((r11+1)*8)+5,358-(r1 - (r11+1))*10);
              g.drawLine(100-((r11+1)*8),357-(r1 - (r11+1))*10,100+((r11+1)*8)+5,357-(r1 - (r11+1))*10);
              g.drawLine(100-((r11+1)*8),356-(r1 - (r11+1))*10,100+((r11+1)*8)+5,356-(r1 - (r11+1))*10);
         while(rod22.size()>0)
    { g.setColor(Color.RED);
              r22 = rod22.size()-1;
         System.out.println("TEST *************************:"+r22);
              try
         // e.printStackTrace();      
              InputStreamReader isr = new InputStreamReader(System.in);
         BufferedReader br = new BufferedReader(isr)      ;
         br.readLine() ;
         }catch(Exception f) {}
              rd2 = ((String)rod22.remove(r22)).trim();
    r21 = Integer.valueOf(rd2).intValue();
    g.drawLine(300-((r22+1)*8),360-(r2 - (r22+1))*10,300+((r22+1)*8)+5,360-(r2 - (r22+1))*10);
    g.drawLine(300-((r22+1)*8),359-(r2 - (r22+1))*10,300+((r22+1)*8)+5,359-(r2 - (r22+1))*10);
              g.drawLine(300-((r22+1)*8),358-(r2 - (r22+1))*10,300+((r22+1)*8)+5,358-(r2 - (r22+1))*10);
              g.drawLine(300-((r22+1)*8),357-(r2 - (r22+1))*10,300+((r22+1)*8)+5,357-(r2 - (r22+1))*10);
              g.drawLine(300-((r22+1)*8),356-(r2 - (r22+1))*10,300+((r22+1)*8)+5,356-(r2 - (r22+1))*10);
         while(rod33.size()>0)
    { g.setColor(Color.RED);
              r32 = rod33.size()-1;
              rd3 = (String)rod33.remove(r32);
    r31 = Integer.valueOf(rd3).intValue();
    g.drawLine(500-((r32+1)*8),360-(r3 - (r32+1))*10,500+((r32+1)*8)+5,360-(r3 - (r32+1))*10);
    g.drawLine(500-((r32+1)*8),359-(r3 - (r32+1))*10,500+((r32+1)*8)+5,359-(r3 - (r32+1))*10);
              g.drawLine(500-((r32+1)*8),358-(r3 - (r32+1))*10,500+((r32+1)*8)+5,358-(r3 - (r32+1))*10);
              g.drawLine(500-((r32+1)*8),357-(r3 - (r32+1))*10,500+((r32+1)*8)+5,357-(r3 - (r32+1))*10);
              g.drawLine(500-((r32+1)*8),356-(r3 - (r32+1))*10,500+((r32+1)*8)+5,356-(r3 - (r32+1))*10);
    why i m not able to use repaint() method in tower class? from where i can use repaint() method

    i can't read your code - not formatted with code tags
    I have no chance of getting it to compile (AboutDialog class?? p.draw() ??)
    here's a basic routine - add a couple of things to this to demonstrate what is not
    being redrawn
    (compare the readability of below code (using tags) to yours)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      public Testing()
        setSize(400,300);
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        final DrawPanel dp = new DrawPanel();
        JButton btn = new JButton("Change Text Location/Repaint");
        getContentPane().add(dp,BorderLayout.CENTER);
        getContentPane().add(btn,BorderLayout.SOUTH);
        btn.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            dp.x = (int)(Math.random()*300);
            dp.y = (int)(Math.random()*150)+50;
            repaint();}});
      public static void main(String[] args){new Testing().setVisible(true);}
    class DrawPanel extends JPanel
      int x = 50, y = 50;
      public void paintComponent(Graphics g)
        super.paintComponent(g);
        g.drawString("Hello World",x,y);
    }

  • Issue with CHECK_CHANGED_DATA  method of CL_GUI_ALV_GRID class

    HI,
    I want to check whether my grid has any changes or not, for that i am using the CHECK_CHANGED_DATA method of CL_GUI_ALV_GRID class,
    What i am doing is.... I am doing some changes in my grid data  and clicking on SAVE . This time  CHECK_CHANGED_DATA is saying the grid have changes ,and i am displaying a pop up whether to save the changes or not. And i am saving changes.
    Till now Fine.
    If i click on SAVE again CHECK_CHANGED_DATA is showing again the Grid has changes. 
    So how can i solve this problem.
    Thanks in advance.

    Hello Narendra
    If you do not need to do any validations of the changed ALV list data then you can use a very simple approach which does not even require an event handler for event DATA_CHANGED.
    The crucial part of the coding is shown below, followed by the entire sample report ZUS_SDN_ALV_EDITABLE_1A. Basically, the ALV list is stored as a "PBO" image of the data (GT_OUTTAB_PBO). And only if the user changed the data (i.e. GT_OUTTAB_PBO <> GT_OUTTAB) the save option including the popup is executed.
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      " NOTE: retrieve changed data from frontend (grid control) into
      "       the backend (itab in ABAP)
      go_grid->check_changed_data( ).
      CASE gd_okcode.
        WHEN 'BACK'  OR
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'SAVE'.
          IF ( gt_outtab = gt_outtab_pbo ).
            MESSAGE 'No data changed' TYPE 'S'.
          ELSE.
            CLEAR: gd_answer.
            CALL FUNCTION 'POPUP_TO_CONFIRM'
              EXPORTING
    *             TITLEBAR                    = ' '
    *             DIAGNOSE_OBJECT             = ' '
                text_question               = 'Save data?'
              IMPORTING
                answer                      = gd_answer
    *           TABLES
    *             PARAMETER                   =
              EXCEPTIONS
                text_not_found              = 1
                OTHERS                      = 2.
            IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            IF ( gd_answer = '1' ).  " yes
              MESSAGE 'Data successfully saved' TYPE 'S'.
              gt_outtab_pbo = gt_outtab.  " update PBO data !!!
            ELSE.
              MESSAGE 'Action cancelled by user'  TYPE 'S'.
            ENDIF.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *& Report  ZUS_SDN_ALV_EDITABLE
    * Flow logic of screen '100' (no elements, ok-code => gd_okcode ):
    **PROCESS BEFORE OUTPUT.
    **  MODULE STATUS_0100.
    **PROCESS AFTER INPUT.
    **  MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_alv_editable_1a.
    TYPE-POOLS: abap.
    CONSTANTS:
      gc_tabname       TYPE tabname  VALUE 'KNB1'.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                          WITH DEFAULT KEY.
    DATA:
      gd_okcode        TYPE ui_func,
      gd_repid         TYPE syst-repid,
      gt_fcat          TYPE lvc_t_fcat,
      gs_layout        TYPE lvc_s_layo,
      gs_variant       TYPE disvariant,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid          TYPE REF TO cl_gui_alv_grid.
    DATA:
      gs_outtab        TYPE ty_s_outtab,
      gt_outtab        TYPE ty_t_outtab,
      gt_outtab_pbo    TYPE ty_t_outtab.
    DATA:
      gd_answer        TYPE c.
    START-OF-SELECTION.
      SELECT * FROM  (gc_tabname) INTO TABLE gt_outtab UP TO 99 ROWS.
      gt_outtab_pbo = gt_outtab.  " set PBO data
      PERFORM init_controls.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Form  INIT_CONTROLS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent = cl_gui_container=>screen0
          ratio  = 90
        EXCEPTIONS
          OTHERS = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid
        EXPORTING
          i_parent = go_docking
        EXCEPTIONS
          OTHERS   = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      " NOTE: not required
    *  set handler:
    *    lcl_eventhandler=>handle_data_changed for go_grid.
    * Build fieldcatalog and set hotspot for field KUNNR
      PERFORM build_fieldcatalog.
      PERFORM set_layout_and_variant.
    * Display data
      CALL METHOD go_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
          is_variant      = gs_variant
          i_save          = 'A'
        CHANGING
          it_outtab       = gt_outtab
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          OTHERS          = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE:
    * Documenation of I_SAVE ("An Easy Reference for ALV Grid Control")
    *I_SAVE
    *Determines the options available to the user for saving a layout:
    *? 'X': global saving only
    *? 'U': user-specific saving only
    *? 'A': corresponds to 'X' and 'U'
    *? SPACE: no saving
    * Link the docking container to the target dynpro
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " INIT_CONTROLS
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      " NOTE: retrieve changed data from frontend (grid control) into
      "       the backend (itab in ABAP)
      go_grid->check_changed_data( ).
      CASE gd_okcode.
        WHEN 'BACK'  OR
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'SAVE'.
          IF ( gt_outtab = gt_outtab_pbo ).
            MESSAGE 'No data changed' TYPE 'S'.
          ELSE.
            CLEAR: gd_answer.
            CALL FUNCTION 'POPUP_TO_CONFIRM'
              EXPORTING
    *             TITLEBAR                    = ' '
    *             DIAGNOSE_OBJECT             = ' '
                text_question               = 'Save data?'
    *             TEXT_BUTTON_1               = 'Ja'(001)
    *             ICON_BUTTON_1               = ' '
    *             TEXT_BUTTON_2               = 'Nein'(002)
    *             ICON_BUTTON_2               = ' '
    *             DEFAULT_BUTTON              = '1'
    *             DISPLAY_CANCEL_BUTTON       = 'X'
    *             USERDEFINED_F1_HELP         = ' '
    *             START_COLUMN                = 25
    *             START_ROW                   = 6
    *             POPUP_TYPE                  =
    *             IV_QUICKINFO_BUTTON_1       = ' '
    *             IV_QUICKINFO_BUTTON_2       = ' '
              IMPORTING
                answer                      = gd_answer
    *           TABLES
    *             PARAMETER                   =
              EXCEPTIONS
                text_not_found              = 1
                OTHERS                      = 2.
            IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
    *         Triggers PAI of the dynpro with the specified ok-code
            IF ( gd_answer = '1' ).  " yes
              MESSAGE 'Data successfully saved' TYPE 'S'.
              gt_outtab_pbo = gt_outtab.  " update PBO data !!!
            ELSE.
              MESSAGE 'Action cancelled by user'  TYPE 'S'.
            ENDIF.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = gc_tabname
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ls_fcat-edit = abap_true.
      MODIFY gt_fcat FROM ls_fcat
          TRANSPORTING edit
        WHERE ( key NE abap_true ).
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SET_LAYOUT_AND_VARIANT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_layout_and_variant .
      CLEAR: gs_layout,
             gs_variant.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-zebra      = abap_true.
      gs_variant-report = syst-repid.
      gs_variant-handle = 'GRID'.
    ENDFORM.                    " SET_LAYOUT_AND_VARIANT
    Regards
      Uwe

  • Removing deprecated methods from legacy source?

    What does one do about deprecated methods in legacy code?
    As new versions of the compiler seem to keep supporting the deprecated methods (just offering warnings), there is no reason to invest the resources to update the source? I don't mean methods such as:
    java.lang.Thread stop(),
    I am thinking of methods such as:
    java.awt.Window show();
    Will there ever be tangible consequences to not stopping using deprecated methods? Will code with deprecated methods eventually break?
    Edited by: dpxqb on May 7, 2010 9:50 PM

    There's often an "if it ain't broke, don't fix it" mentality around deprecated methods and classes. Whether that's appropriate or not depends on the individual case. Any deprecated method/class may be removed in any future release, but you have to balance the risk of that happening against the cost of replacing it. Some methods/classes will probably never go away--like Vector, for instance. So there's not much benefit to doing a search/replace on a large codebase.
    It depends on your analysis of the various risks and rewards in your particular situation.

  • Change valuation method from moving average to FIFO

    We have incorrectly given valuation method for our raw materials to moving average instead of FIFO. Now, we have a lot of transactions and cannot change the method after a transaction is done for any item. I want to know if this solution will work:
    1. create new database with item and business master data, chart of accounts, item groups as before
    2. change valuation method of all items
    3. Import GRPO, Excise and A/P invoices from old database
    Does step 3 create its own JEs?? If it does, then my problem will be solved.

    Hi Krishna,
    this is the SAP Business One Forum in German. Please post your threads in English to the forum here:
    SAP Business One Application
    All the best,
    kerstin

  • Help! how to refresh the JTable of a class from another thread class

    there is an application, in server side ,there are two classes, one is a class called face class that screen a JTable, another is a class the a thread ,which accept socket from client, when it accept the client socket, it deal the data and insert into db,then notify the face class to refresh the JTable,but in the thread class I used JTable's revalidate() and updateUI() method, the JTable does not refresh ,how should i do, pls give me help ,thank you very much

    thank you very much !
    i tried it ,but the TableModel i used like this ,and how to change the TableModel?
    here the files of mine ,pls give me some help,thank you very much
    1,first file is a class that create a JInternalFrame,and on it there is a table
    public class OutFace{
    public JInternalFrame createOutFace(){
    JInternalFrame jf = new JInternalFram();
    TableModel tm = new MyTableModel();
    JTable jt = new JTable(tm);
    JScrollPane jsp = new JScrollPane();
    jsp.add(jt);
    jf.getContentPane().add(jsp);
    return jf;
    2,the second file is the main face ,there is a button,when press the button,screen the JInternalFrame. there is also a thread is beggining started .
    public class MainFace extends JFrame implements ActionListener,Runnable{
    JButton jb = new JButton("create JInternalFrame");
    jb.addActionListener(this);
    JFrame fram = new JFrame();
    public void performance(ActionEvent e){
    JInternalFrame jif = new OutFace().createOutFace(); frame.getContentPane().add(JInternalFrame,BorderLayout.CENTER);
    public static void main(String[] args){
    frame.getContentPane().add(jb,BorderLayout.NORTH);
    frame.pack();
    frame.setVisible(true);
    ServerSokct ss = new ServerSocket(10000);
    Socket skt = ss.accept()'
    new ServerThread(skt).start();
    3.the third file is a thread class, there is a serversoket ,and accept the client side data,and want to refresh the JTable of the JInternalFrame
    public class ServerThread extends Thread{
    private skt;
    public ServerThread(Sokcet skt){
    this.skt = skt;
    public void run(){
    OutputObjectStream oos = null;
    InputObjectStream ios = null;
    try{
    Boolean flag = flag;
    //here i want to refresh the JTable,how to write?? }
    catch(){}
    4.second is the TableModel
    public class MyTableModel{
    public TableModel createTableModel(){
    String[][] data = getData();
    TableModel tm = AbstractTableModel(
    return tm;
    public String[][] getData(){
    }

Maybe you are looking for

  • My acrobat plug in is not letting me view certain cites and says is disbaled. How do I fix this.

    I am trying to use the website ATI and I have the recommened internet for it but when I launch it it says the acrobot plug in is disabled and I was wondering how to fix that,

  • Issue while generating Field catalog using LVC_VARIANT_SELECT

    Hello Folks,   When i passed the default field catalog to the function module LVC_VARIANT_SELECT... for which the field name that is passed is standard field and the table name i was passing is Internal table ( Which is mandatory for my Req). As i am

  • Phone not working properly

     Iam using E 72. I have done the soft ware updation myself thru net. But still the phone is not working properly. While using the tutorilas, the graphics are coming but not the description. 

  • How do I program controls for my robot?

    Currently I'm trying to Program a robot to move according to the control of a person using a controller. I am having trouble getting the robot to response to the controller is there any tutorials or help threads out there I can use to help fix my pro

  • Best Java 1.06 version to use with 10g release 3 of Forms.

    Were migrating to lthe atest version of Forms 10.1.2.3. As a result, were updating our java runtime from 1.05_12 to 1.06. The question is what version of java 1.06 have users found most stability? Trying 1.06_7 so far have been positive (i.e don't lo