Help Required With Moving Containers Please

Hello,
I'm in urgent need of a solution in the following JAVA program:
import java.awt.*;
import java.util.Random;
* Initial template
public class SwanLake extends ThreeButtons {
    private ThreeButtonFrame win;
    private Rectangle background;
    private Container swan;
    public SwanLake() {
        win = new ThreeButtonFrame("Swan Lake");
        background = new Rectangle(50,50,500,350);
        background.setBackground(Color.black);
        win.add(background,0);
        scene();
        drawstars();
        Container moon = makemoon();
        background.add(moon,0);
        Container swan = makeswan();
        background.add(swan,0);
        win.repaint();
    private void scene() {
        Oval lake = new Oval (-80,200,400,200);
        lake.setBackground(Color.blue);
        background.add(lake,0);
    private void drawstars() {
        Random r = new Random();
        Oval star1 = new Oval(r.nextInt(500),r.nextInt(150),5,5);
        star1.setBackground(Color.lightGray);
        background.add(star1,0);
        Oval star2 = new Oval(r.nextInt(500),r.nextInt(150),10,5);
        Oval star3 = new Oval(r.nextInt(500),r.nextInt(150),5,4);
        Oval star4 = new Oval(r.nextInt(500),r.nextInt(150),12,5);
        Oval star5 = new Oval(r.nextInt(500),r.nextInt(150),5,7);
        Oval star6 = new Oval(r.nextInt(500),r.nextInt(150),8,15);
        star2.setBackground(Color.lightGray);
        star3.setBackground(Color.lightGray);
        star4.setBackground(Color.lightGray);
        star5.setBackground(Color.lightGray);
        star6.setBackground(Color.lightGray);
        background.add(star2,0);
        background.add(star3,0);
        background.add(star4,0);
        background.add(star5,0);
        background.add(star6,0);
    private Container makemoon()  {
        Container moon = new Container();
        moon.setBounds(350,50,40,40);
        Oval shape = new Oval(0,0, 40,40);
        shape.setBackground(Color.lightGray);
        moon.add(shape,0);
        return moon;
        private Container makeswan()  {
        Container swan = new Container();
        swan.setBounds(100,250,100,50);
        Oval shape1 = new Oval(20,20, 40,20);
        shape1.setBackground(Color.white);
        swan.add(shape1,0);
        return swan;
    public void leftAction() {
    public void midAction() {
    public void rightAction() {
}What's required in the left, mid, & right Actions at the very end is:
To add instructions to the rightAction() method to make the swan move 10 pixels to the
right each time the RIGHT button is pressed. Similarly, add instructions to the
leftAction() method to make the swan move 10 pixels to the left when the LEFT
button is pressed. Finally, when the MID button is pressed, make the moon move two
pixels to the right and one pixel downwards.
Tho get the a fuller idea the complete program can be downloaded here:
http://rapidshare.com/files/162316479/Swan.rar
If anyone can help, I'd greatly appreciate it.
Thanks,

so what have you tried?
edit: nvrmind, I'm going to bed. Hint: you're trying to move a Container. So find it's API, look up the methods regarding this critter, and see if you can find any that tell you its current location and how to set a new location. Good luck.
Edited by: Encephalopathic on Nov 9, 2008 8:23 PM

Similar Messages

  • Help required with (soundcard) connection / settings, thanks in advan

    Help required with connection / settings between a Creative Sound Blaster Audigy Platinum EX (soundcard) and a Creative DTT3500 Digital (5. speakers).
    The problem
    No sound from any of the speakers. (Exception can plug in headphones at front)
    Background
    My computer has been recently upgraded at my local computer shop and all programs re-installed (including driver update from Creative's website). However after reconnecting speakers and restoring the original settings I?m getting no sound from any of the speakers. I?ve followed all the available advice/instructions I can find on this website and manuals to no avail.
    Set-up
    Physical
    (Digital DIN) Speakers/decoder amplifier (DTT3500) connected to the (digital out) soundcard (Audigy Platinum EX) using minijack to DIN cable. (As per instruction manual)
    Software
    Creative Audio Consul ? setting as per instructions, however have tried variations in vain. (Note: above tabs there is a select device box with SB Audigy [A0000] in it ? only option. Just wondering what [A0000] means?)
    Your advice please. A simple step by step guide would be appreciated, many thanks in advance, Jon

    "My computer has been recently upgraded at my local computer shop and all programs re-installed (including driver update from Creative's website). "
    Do you have the original installation disk?
    If so, try installing THOSE drivers, ESPECIALLY if it worked before. Be sure to uninstall what is there now, first.
    Its natural for most people to want the 'latest' drivers for their hardware. However:
    After experiencing some difficulties with some CL 'updates' for certain products, I now avoid them UNLESS I am having a PROBLEM with the existing drivers.

  • Help required with Photoshop Elements 4.0 this has been installed on my new Toshiba laptop with windows 8.1 for some 18 months and operating well. Now it will not open, message pops up saying "attempt to access invalid address" then "application not respo

    Help required with Photoshop Elements 4.0 this has been installed on my new Toshiba laptop with windows 8.1 for some 18 months and operating well. Now it will not open, message pops up saying “attempt to access invalid address” then “application not responding” Suggestions how to access would be much appreciated. Tks. Stuart

    What is the size of your hard disk?  PSE 4 is a very old program and I suspect it is not able to access the entire hard disk on your machine.  Just a thought here.

  • Help require with installing Adobe Acrobat onto my Macbook Pro Retina.

    Help require with installing Adobe Acrobat onto my Macbook Pro Retina.
    I have successfully installed all of my creative cloud apps with the exception being acrobat.
    I cannot print from Indesign to PDF.
    I have unistalled, reinstalled and still no Adobe Acrobat.
    I now have to go back to Windows 8 and create the PDF's there.
    Any one know how to get around this issue?
    Thanks in advance
    Kelvin

    OSX has effectively killed the ability to print to pdf, (print to pdf eliminates most of the "Rich features" of current pdf).
    Export from InDesign, always, excpet for the 1% of the time where you know why print to pdf would produce a better result.

  • TS1424 I get "We could not complete your iTunes Store request. An unknown error occurred (4002)  Can any person help me with this on, please?

    I get "We could not complete your iTunes Store request. An unknown error occurred (4002)  Can any person help me with this on, please?

    Turning off iTunes Match and Genius and then turning them back on appears to have worked for some people e.g.
    https://discussions.apple.com/message/22059685#22059685
    https://discussions.apple.com/message/18427550#18427550

  • When I plug in my headphones into my imac only the right side plays music. I tried with other headphones and still has the same problem. I tried the headphones with other devices and they work properly. Can anyone help me with my problem please?

    When I plug in my headphones into my imac only the right side plays music. I tried with other headphones and still has the same problem. I tried the headphones with other devices and they work properly. Can anyone help me with my problem please?

    Macs have crazy headpne jacks in different models.
    So we know more about it...
    At the Apple Icon at top left>About this Mac, then click on More Info, then click on Hardware> and report this upto but not including the Serial#...
    Hardware Overview:
    Model Name: iMac
    Model Identifier: iMac7,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.4 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 4 MB
    Memory: 6 GB
    Bus Speed: 800 MHz
    Boot ROM Version: IM71.007A.B03
    SMC Version (system): 1.21f4

  • Hey guy can you please help me with this issue PLEASE!

    Hey Apple can you please help me with this issue, i have a iPhone 3gs and when i put my sim card into the iPhone it makes iphone 3gs shut down suddenly how do i fix that?
    iPhone version: 6.0.1
    service provider: Vodafone nz

    You could restarting your phone that sometimes fixes issues
    Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for phone to restart (no data will be lost).

  • Help required with User exit logic

    Hi gurus,
    Please help me with the logic I wrote for the user exit for a PP Work Center View extract structure. Here is the details of the add on fields: VGW01, VGW02, VGW03, STEUS(from table PLPO); DataSource: 2LIS_04_P_ARBPL,
    data: l_s_pp1 like MC04P_0ARB(extract structure of 2LIS_04_P_ARBPL),
    l_tabix like sy-tabix,
    lv_VGW01 like PLPO-VGW01.
    lv_VGW02 like PLPO-VGW02.
    lv_VGW03 like PLPO-VGW03.
    lv_STEUS like PLPO-STEUS.
    tables : PLPO.
    case i_datasource.
    when '2LIS_04_P_ARBPL'.
    loop at c_t_data into l_s_pp1.
    select single vgw01into lv_vgw01
    from PLPO
    where field = l_s_pp1-field.
    if sy-subrc = 0.
    l_s_pp-zzvgw01 = lv_vgw01.
    l_s_pp-zzvgw02 = lv_vgw02.
    l_s_pp-zzvgw03 = lv_vgw03.
    l_s_pp-zzsteus  = lv_steus.
    endif.
    modify c_t_data from l_s_pp1 index l_tabix.
    endloop.
    Any additional comments welcome. Thanks in advance.

    Hi,
    Try coding as per the below code
    case i_datasource.
      When '2LIS_04_P_ARBPL'.
      DATA: lt_data TYPE TABLE OF MC04P_0ARB.
      FIELD-SYMBOLS: <ls_data> TYPE MC04P_0ARB.
    Internal table for
      TYPES:
            BEGIN OF ty_tbl1,
                     lv_VGW01 TYPE PLPO-VGW01,
                     lv_VGW02 TYPE PLPO-VGW02,
                     lv_VGW03 TYPE PLPO-VGW03,
                     l_bmsch  TYPE XXXX-XXXX,
                     l_plnnr  TYPE XXXX-XXXX
                     l_datuv  TYPE XXXX-XXXX
                     l_aennr  TYPE XXXX-XXXX
                     l_plnkn  TYPE XXXX-XXXX
                     l_plnal  TYPE XXXX-XXXX
            END OF ty_tbl1.
      DATA:
             lt_tb1 type standard table of ty_tbq,
             ls_tb1 type ty_tb1.
      lt_data[] = c_t_data[].
    Read data into internal memory using jOins
      select aVGW01 aVGW02 aVGW02 aVGW02 bbmsch bplnnr bdatuv baennr bplnkn bplnal into into  CORRESPONDING FIELDS OF TABLE
      lt_tb1 from PLPO as a innerjoin XXXX as b where aXXXX=bXXXX.        
    use the internal table to get the data to the enhaced fileds
    LOOP AT lt_data ASSIGNING <ls_data>.
        read table lt_tb1 into ls_tb1
             with key XXXXX = <ls_data>-XXXX .
        if sy-subrc eq 0.
          <ls_data>-lV_VGW01 = ls_tb1-lv_VGW01,
          <ls_data>-lV_VGW02 = ls_tb1-lv_VGW02,
          <ls_data>-lV_VGW03 = ls_tb1-lv_VGW03,
          <ls_data>-bmsch    = ls_tb1-bmsch,
          <ls_data>-plnnr    = ls_tb1-plnnr,
          <ls_data>-datuv    = ls_tb1-datuv,
          <ls_data>-aennr    = ls_tb1-aennr,
          <ls_data>-plnkn    = ls_tb1-plnkn,
          <ls_data>-pln1l    = ls_tb1-plnal.
          MODIFY lt_data FROM <ls_data>.
        endif.
      ENDLOOP.
      REFRESH c_t_data.
      c_t_data[] = lt_data[].
    Note that the code is not written with the exact fields. Change the fields where necessary(also i have joined only 2 tables if needs to be joind form more than 2  table change the join statement accordingly).
    Thanks,
    Nagarjuna
    Edited by: Nagarjuna Reddy on Oct 20, 2011 3:39 AM

  • HT1212 I don't remember the password of my iphone. I restarted the phone with IOS 7. But I can't remember what the password was. Help me with my problem please.

    I don't remember the password for my iphone 4. I restated it with IOS 7 and the iphone is disable.Please help me with that.

    You will have to restore it from Recovery mode, as described in the tip you were reading when you posted your message. Or see: http://support.apple.com/kb/HT1808. You will lose all data on your phone.

  • Immediate help required with this job scheduling scenario

    I have a job that needs to run a procedure hourly but not between 6:00 AM to 8:00 AM and 6:00 PM to 8:00 PM.
    Can anyone help me with how to schedule this job.

    If you use a window the job would only execute if the window opens. If for some reason the window did not open then the job would not execute.
    Windows should be used to specify which resource plan should be active for the time interval.
    In this case you are better off using FREQ=DAILY; BYHOUR=; and specify the hours.

  • Help required with Select statment..... ASAP pls

    HI All,
    Let me desc my table first .
    01                             NOT NULL VARCHAR2(5)                                                                                                                                                                                  
    02                             NOT NULL VARCHAR2(5)                                                                                                                                                                                  
    03                             NOT NULL VARCHAR2(5)                                                                                                                                                                                  
    04                             NOT NULL VARCHAR2(5)
    31                                                    This is how table has been created(Note:not by me)
    select name from  od_shift  where year=2011 and month='Feb' and  "02"='W"{code}-->no doubt this is working fine
    My problem is ...here rather putting the number directly ("01","02","03"....."31") 
    I need to take it from the first two digits of date('01-feb-2011') 
    like {code}
      select name from  od_shift  where year=2011 and month='Feb' and  to_char(to_date('01-feb-2011','dd-mon-yyyy'),'dd')='W" but this is not working
    kindly help me with this .
    Edited by: Basva on Mar 8, 2011 4:53 AM

    Pleiadian wrote:
    You could do a case statement. It's not elegant, but it works
    Edit: smon's solution is better if pl/sql is an optionI disagree, it's quite elegant given the cirumstances of that sick table. And it definitely beats a dynamic SQL solution.
    @Basva - when will you realize that your table is no good, and needs to be normalized into a more traditional relational table?
    Regards
    Peter

  • Help required with an image

    Hi all,
    I wonder if someone can help me with the following issue.
    If you see the attached image in the top left hand corner their is a square box which is a different shade to the rest of the header.
    I need to rectify this and blend it in with the rest on the header colour; however, I do not know how to do this and would appreciate some assistance in doing this.
    I'm a noobie to photoshop so any help is much appreciated.

    It seems you've copied another portion of the texture to overlay something you didn't want seen...
    As opposed to copy/paste of a rectangular region, this is almost a textbook use for Content Aware Fill, which should (assuming it works properly) match the pattern and blend the colors.
    Try selecting just the blemish or whatever you're trying to cover, then expand the selection a few pixels, then Edit - Fill - Content Aware.
    -Noel

  • CheckPoints with Sequence containers - Please help

    Hi experts,
    I have a very critical requirement using checkpoints.I have SSIS 2012.
    As you can see, there are two sequence containers (Call it as SEQC). SEQC1 has Execute SQL tasks 1 , 2 and 3. Similarly SEQC2 has tasks  4,5 and 6.
    After that two individual tasks task 7 & 8.
    The requirement is, I have to implement both CheckPoint and Transaction feature in the package.That means,the restartability should be BLOCK wise. ie
    1) If the task 3 (inside SEQc1) fails, then the tasks done by the Task1 and task2 should be rolled back and next execution should start from the Task1 and NOT from the Task3.
    2) If the SEQC1 is success, but the task 6 (inside SEQc2) fails, then the tasks done by the SEQC1 should be COMMITTED and tasks done by the Task4 and task5 should be rolled back  and next execution SHOULD start from the Task4 and NOT from the Task6 or
    NOT from Task1 of SEQC1.
    3) If the SEQC1 and SEQC2 succeeds but the next individual task Task7 fails, then SEQC1 and SEQC2 tasks should be committed and the next execution starts only from the Task7.
    Could you please tell me is it possible to combine  CheckPoint and transaction options? If not, any workarounds?
    Requirements 1 and 2 can be achieved ONLY when i enable'Transactions=Required' in SEQC 1 and 2 . But when I enable this, if the task6 in SEQC2 fails, the the next execution starts from task1 of SEQC1, but the requirement is to start from task4 of SEQC2.
    I tried a lot but not able to accomplish this.Your help would be greatly appreciated.

    From Books online
    Using checkpoints and transactions in the same package could cause unexpected results. For example, when a package fails and restarts
    from a checkpoint, the package might repeat a transaction that has already been successfully committed.
    That being said you can use checkpoints and make it start from failed step. However I dont think you'll be able to start from start of the sequence generator as other tasks previously successful would have already logged the info to checkpoint file so they
    will not get executed again.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Can you help me with my program please?

    hi all,
    I have a problem with the sellMilk function at the Milk class I don't know how to write it right I've tried everything so I need you to help me.
    this function should check the expiry date of the milk and sell the required amount if it is not expired. if it was expired just delete the milkbox.
    I have cases like if the first box has 5 kg and not expired , second box has 10 kg and expired, third box has 8 kg and not expired .. and if the required amount to sell is 6 kg for example it should work like this: first box should become zero because 5 kg has been sold and remainder is 1 .. so it should check the expiry date of the second box and it is expired so delete it. and then check the third box's expiry date and it is not expired so 8-1 = 7 .. and by that way 6 kg has been sold.
    my program it just delete the expired box if it was the first element.
    my code doesn't work well like that! here is the full program so you can check the code to help me please ..
    the problem is just with SellMilk() at the Milk Class
    Thank you
    import java.io.*;
    import java.text.*;
    import java.util.*;
    public class Market
        public static void main(String args[ ])
        { System.out.print("Enter the Market name: " );
            String name1 = Stdin.readLine();
            Market_Store mymarketstore = new Market_Store(name1);
       System.out.println("Welcome To " +name1+" Market ");
       System.out.println("");
            System.out.println("1-Stock new Milk");
            System.out.println("2-Stock new Milk Box");
            System.out.println("3-Sell");
            System.out.println("4- Display");
            System.out.println("");
            System.out.print("Enter your choice: ");
            int choice = Stdin.readInteger();
            while (choice != 5)
                switch (choice)
                case 1:
                 mymarketstore.stockNewMilk();
                    break;
                case 2:
                    mymarketstore.stockMilkBox();
                    break;
                    case 3:
             mymarketstore.sell();
                break;
                case 4:
               mymarketstore.display();
                            break;
                            case 5:
                default:
                    System.out.println("wrong Number");
                    System.out.println("Enter a number between 1 to 4 ");
                    System.out.println("Enter 5 to Exit");
                    break;
                System.out.println("");
              System.out.println("Welcome To " +name1+" Market ");
       System.out.println("");
            System.out.println("1-Stock new Milk");
            System.out.println("2-Stock new Milk Box");
            System.out.println("3-Sell");
            System.out.println("4-Display");
            System.out.println("");
             System.out.print("Enter your choice: ");
                choice = Stdin.readInteger();
    class Market_Store
            private String name;
            private Vector mymilk;
            public Market_Store(String n)
                    name=n;
                    mymilk = new Vector();
            public void stockNewMilk()
                    String N;//milk type
                    System.out.print("Enter the type of the milk: ");
                    N=Stdin.readLine();
                    Milk  m1 = new Milk (N);
                    mymilk.addElement(m1);
            public void stockMilkBox()
            System.out.println("Milk Available in stock : ");
            for (int i=0; i<mymilk.size(); i++){
            Milk m2 = (Milk)mymilk.elementAt(i);
            System.out.print(i+1+")");
            System.out.println(m2.getMilkType());  }
                    System.out.print("Enter the number of the milk to stock new box: ");
            int     ii = Stdin.readInteger();
            ((Milk)(mymilk.elementAt(ii-1))).addNewBox();
            }//end stockMilkBox
            public void sell()
                    //sell specific type of milk
                   System.out.println("Milk Available in stock : ");
            for (int i=0; i<mymilk.size(); i++){
            Milk m2 = (Milk)mymilk.elementAt(i);
            System.out.print(i+1+")");
            System.out.println(m2.getMilkType());
                                   System.out.print("Enter the number of the milk to sell:  ");
            int     ii = Stdin.readInteger();
    System.out.print("Enter the amount required in Kg:  ");
    double amount = Stdin.readDouble();
            ((Milk)(mymilk.elementAt(ii-1))).sellMilk(amount);
            public void display()
            {      System.out.println("Milk Available in stock : ");
            for (int i=0; i<mymilk.size(); i++){
            Milk m2 = (Milk)mymilk.elementAt(i);
            System.out.print(i+1+")");
            System.out.println(m2.getMilkType());
                    System.out.print("Enter the number of the milk to display:  ");
            int     ii = Stdin.readInteger();
                    ((Milk)(mymilk.elementAt(ii-1))).display();
    class MilkBox
            private Date expiredate;
            private Date date;
            private double stock;
            public MilkBox(double stck, Date ed)
                     date = new Date();
                    expiredate = ed;
            public double getStock()
             return stock;     }
            public Date getDate()
                     return date;
    public void setStock(double st)
    { stock = st;}
    public void setExDate(Date dd)
    {expiredate = dd;}
            public Date getExDate()
                     return expiredate;
      public   double sellMilkBox(double amount)
            double excessAmount = 0;
            if (amount < stock)
                double newAmount = stock - amount;
                setStock(newAmount);
            else  
                excessAmount = amount - stock;
                setStock(0);
            return excessAmount;
    public     void display()
                            System.out.println("The box of "+date+" has " +stock+" KG");
    class Milk
            private String Mtype;//milk type
            private Vector mybox;//vector of batches
            public Milk (String n)
                    Mtype =n;
            mybox = new Vector();
      public  void addNewBox()
    double stook;
    System.out.print("Enter the weight of the box: ");
    stook = Stdin.readDouble();
         Date exdate;//expirey date
    System.out.println("Enter the expirey date of the milk box:");
           int d; int m1; int y;
              System.out.println("Enter Year:" );
              y = Stdin.readInteger();
              System.out.println("Enter Month:" );
              m1 = Stdin.readInteger();
              System.out.println("Enter Day:" );
              d = Stdin.readInteger();
                   Calendar r=new GregorianCalendar(y,m1,d);
                    exdate= r.getTime();
                    //send the attributes to Box constructor
                   MilkBox newBox = new MilkBox(stook,exdate);
                    newBox.setStock(stook);
                    newBox.setExDate(exdate);
                    mybox.addElement(newBox);
       public void display()
                    System.out.println("Milk "+Mtype);
                            for (int i=0; i<mybox.size(); i++){
                    MilkBox b= (MilkBox)mybox.elementAt(i);
                    b.display();
    public double sellMilk (double amount)
       for(int i=0;i<mybox.size();i++)
               MilkBox b = (MilkBox)mybox.elementAt(i);
                double stock = b.sellMilkBox(amount);
                double value = b.getStock();
                Date ExpireyDate = b.getExDate();
      if ( ExpireyDate.before(new Date()))
    {  mybox.removeElementAt(i);
            System.out.println("it has expired date");
    if (stock >1|| value  ==  0 && ExpireyDate.after(new Date()))
    {       mybox.remove(b);  
    amount = stock;
    if ( ExpireyDate.before(new Date()))
    {  mybox.removeElementAt(i);
            System.out.println("it has expired date");
      if(amount != 0)
      System.out.println("The extra amount is "+amount+ " KG");
    return amount;}
    public String getMilkType()
    { return Mtype;}
    //set method
    void setMilkType(String n)
    { Mtype = n;}
    }//end class milk
    //STDIN FILE
    final class Stdin
       public static BufferedReader reader=new BufferedReader
        (new InputStreamReader(System.in));
       public static String readLine()
       while(true)
       try{
           return reader.readLine();
           catch(IOException ioe)
             reportError(ioe);
           catch(NumberFormatException nfe)
            reportError(nfe);
       public static int readInteger()
        while(true)
        try{
        return Integer.parseInt(reader.readLine());
        catch(IOException ioe)
        reportError(ioe);
        catch(NumberFormatException nfe)
        reportError(nfe);
       public static double readDouble()
        while(true)
        try{
        return Double.parseDouble(reader.readLine());
        catch(IOException ioe)
        reportError(ioe);
        catch(NumberFormatException nfe)
        reportError(nfe);
        public static void reportError (Exception e)
        System.err.println("Error input:");
        System.err.println("please re-enter data");
        }Edited by: mshadows on Dec 22, 2007 12:06 AM

    ok here is the code that has the problem .. what's wrong with it?
    public double sellMilk (double amount)
       for(int i=0;i<mybox.size();i++)
               MilkBox b = (MilkBox)mybox.elementAt(i);
                double stock = b.sellMilkBox(amount);
                double value = b.getStock();
                Date ExpireyDate = b.getExDate();
      if ( ExpireyDate.before(new Date()))
    {  mybox.removeElementAt(i);
            System.out.println("it has expired date");
    if (stock >1|| value  ==  0 && ExpireyDate.after(new Date()))
    {       mybox.remove(b);  
    amount = stock;
    if ( ExpireyDate.before(new Date()))
    {  mybox.removeElementAt(i);
            System.out.println("it has expired date");
      if(amount != 0)
      System.out.println("The extra amount is "+amount+ " KG");
    return amount;}

  • Help required with ADFS 3.0 client certificate authentication

    Hi,
    I am currently working on integrating ADFS 3.o for Single Sign On to some 3rd party services along with PKI solution. The basic requirement is that I should be able to choose client authentication certificate as an authentication method in ADFS and then
    federate user credentials to 3rd party trust for single-sign-on.
    I had done this successfully with ADFS 2.0 and that setup is working fine. I have the setup as ADFS 3.0 client authentication method enabled. When I open browser to logon, the ADFS 3.0 page displays a message as "Select a certificate that you want to
    use for authentication. If you cancel the operation, please close your browser and try again." but the certificates are not displayed for selection.
    The certificates are valid and have valid chaining to CA. Could someone help me resolve this issue?
    Thanks!
    -Chinmaya Karve

    Hi Yan,
    Thanks for your response. I have gone through the posts that you have suggested, and my setup looks pretty much as expected.
    So, as I mentioned earlier, I have 2 parallel setups with 3rd party service(SalesForce). Once of them is running ADFS 2.0 and another one has ADFS 3.0. I can logon to the third-party services, from both the setups using username/format. I can logon to SF
    using client authentication certificate from ADFS 2.0 setup, but from the same client machine, when I try to logon SF via ADFS 3.0, the browser just does not pick up any certificate. The page just shows message of "Select a certificate that you want to use
    for authentication. If you cancel the operation, please close your browser and try again.".
    I have checked the browser, and it has the right certificates. Also, the same browser/machine is used to logon to SF through ADFS 2.0 via client certificate, which works just fine !
    I am really confused now, as to whose issue this really is...
    Just to confirm, I am using Certificate Authentication from ADFS 3.0 Authentication Methods for both Intranet and Extranet.
    Any suggestion or inputs where I could have gone wrong in the setup?
    Thanks!

Maybe you are looking for

  • Mac Mini Server Hangs, Gets Sluggish

    New 2012 Mac Mini Server (2Gig i7 with 8GB memory). Server App is off, and I'm using it as a standalone unit. Running iTunes on an external Thunderbolt RAID. Running Safari with several tabs open. The iMac generally gets irratic within an hour or so:

  • IP address of the user who started a process

    Hello, I there a way of finding the ip address of a user who started a Unix process and then logged off. For example a user oracle logs in to a server $ tty /dev/pts/3 apollo1 $ last | pg oracle pts/3 xx.xx.xx.xxx Fri May 9 09:08 still logged in 'las

  • Why did my keyboard stop working?

    Every time I log into my Mac book Pro all of a sudden it asks me something about Bluetooth keyboard.  I do not have one nor do I want one. I was able to log in and use Quicken on Windows Parallel but could not type anything using Firefox and its Yaho

  • Final Cut doesn't playback when copy any files over network

    First, i want say a thanks for all guys who help us here. Thank you very much. Much appreciate. Now, problem... My Final Cut works perfect sice a starded used 2005, never i have a one problem. But last week i discover this: When a copy any files betw

  • RME 4.0.6 Inventory change filtering

    Hello My question is about the Inventory change filtering in RME 4.0.6 under LMS 2.6 I get hundreds of records like : Port Identity: PortID = 1024 Attribute Type of Change Time Change Detected Previous Value Current Value Port Serial Number New 2010-