A logic problem help

hello experts,
i have a problem with a logic
here I have to pass the VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU, but here the FKDAT and GDATU are of not the same data type and another specification is that
>GDATU is in the inverted date format i have to convert it to date format but how ? and another problem is even if i convert it , i have one more specification given my functional consultant is that the FKDAT will be in some precise date like ( 23.10.2008) where as the GDATU will be in the starting date of the month like (01.10.2008 means it denotes the whole) , so here i have to make the FKDAT to the starting date of its months but how?.
please kindly help me with some detail explaination , here this is the specification given to me.
"To get the value part
Pass VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU for TCURR-KURST=ZCUS. Get UKURS for corresponding entry in INR"
please kindly explain me with 'for all entries' and the complete logic joining the two tables to achive the specification.
Thanks in advance

Hi,
for date conversion you can take help from this..
CONVERSION_EXIT_PDATE_OUTPUT
Eg: input = 24012008 and output = 24.01.2008
CONVERT_DATE_FORMAT
Eg: input = 20080201 and output = 01.02.2008
CONVERSION_EXIT_SDATE_OUTPUT
Eg: input = 20070201 and output = 01.FEB.2007
CONVERSION_EXIT_IDATE_INPUT
Eg: input = 01.02.2008 and Output = 20080201
CONVERSION_EXIT_LDATE_OUTPUT
Eg: input = 20070301 and output = 01. March 2007
CONVERSION_EXIT_PDATE_OUTPUT
Eg: input = 20070301 and output = 03.01.2007
now to match the data type you can use the function module...
CONVERSION_EXIT_INVDT_INPUT    Conversion exit routine for inverted date (INPUT)
CONVERSION_EXIT_INVDT_OUTPUT   Conversion exit routine for inverted date (OUTPUT)
Regards,
Arunima

Similar Messages

  • MOVED: KT333 Ultra; fuzzy logic, 1.6xp overclocking problem help !!!!!

    This topic has been moved to Overclockers & Modding Corner.
    KT333 Ultra; fuzzy logic, 1.6xp overclocking problem help !!!!!

    Not that I am an expert o/c but here are some thoughts on the matter.
    My comments are based on my experiences of the KT3 Ultra2 which is basically the same as the Ultra version.
    This mobo does not have the ability to lock the PCI/AGP bus freely from the FSB. However, it does have dividers. At 133 a 1/4 divider kicks in. Above 152FSB the 1/5 divider works, so that at 166 the PCI & AGP buses will be back in sync. If you are o/c your cpu, don't go from 133 to 145, etc since you will be running the PCI/AGP buses further out of whack. Just go to either the mid 150's or to 166 in one jump. The other problem / issue relates to your cpu. From what you say you have one of the old Palominos which are not great o/c's. I would personally o/c your cpu from the BIOS rather than 'Fluffy Logic' which I would tend to stay away from. 
    With a 166FSB cpu a very stable o/c would be 175-177 beyond 180 gets decidedly tricky.
    Hope this helps

  • My daughter has just bought me an iPad 2 from Dubai and set it all up for me but unfortunately the iMessage function doesn't seem to work. We keep getting messages,when trying to activate it, that there is a network connection problem - help!

    My daughter has just bought me an iPad 2 from Dubai and set it all up for me but unfortunately the iMessage function doesn't seem to work. We keep getting messages,when trying to activate it, that there is a network connection problem - help!

    Thank you both for your responses but my daughter was reassured by the salesman in the iStyle store (official Apple store in the UAE) that iMessages would work but conceded that FaceTime wouldn't. My iTunes account is registered in the uk and my daughter's iPhone has iMessages even though she bought it (and uses it) in Dubai. Can anyone else throw any light on this?

  • I couldn't log into my apple account on my iPad, then i couldn't unlock it resulting in it being disabled, however it's the same as my iPhones password, I then called apple, i was hung up on twice and they said it will cost £70 to fix THEIR problem, help?

    I couldn't log into my apple account on my iPad, then i couldn't unlock it resulting in it being disabled, however it's the same as my iPhones password, I then called apple, i was hung up on twice and they said it will cost £70 to fix THEIR problem, help?

    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup).
    If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present.
    You may have to force iPad/iPod into Recovery Mode
    http://support.apple.com/kb/ht4097

  • IPad syncing problem - HELP!

    iPad sync problem - HELP!  I keep getting this message "...cannot be synced because there is not enough free space to hold all of the items in the iTunes library (additional ...space needed)"  and yet I seem to have plenty of space on the iPad.  This just started today.  I even tried deleting some things to make even more room, but it didn't help.  Any ideas??? 
    I was thinking of restoring, but I've never done it...  should I? 
    thank you!

    Hello florafromnv,
    Welcome to Apple Support Communities.
    The following article addresses how to resolve the issues related to this message:
    iOS: "Not enough free space" alert when trying to sync
    http://support.apple.com/kb/TS1503
    Regards,
    Jeff D.

  • The logical problem in turnover in  for ?

    Welcome
    wrote this code, everything is true but there is a logical problem to be solved first idea of this program is a moving train to the contrary, it can stop and operated once again and that can add cars and locomotives and can delete it but there is a problem when adding that the train carriages have remained stable cart after the first turnover Thus ...
    THAT shows us the error ..
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Train extends JFrame implements ActionListener{
        private boolean check = false;
        private boolean stopped = true;
        private boolean add = false;
        private int trainPlace = 0;
        private int INDEX_START = 0;
        public int speed = 300;
        private ImageIcon CurrentImage ;
        private boolean front=true, back=false ;
        private int carrNum = 0 ;
        private JPanel screen, area , controlroom;
        private JButton[][] street;
        public JButton[] keybord;
        private String s[] = {"Start","Back","Fast","Slow","Add Carriage","Delete Carriage","Rest","Check","Desiners"};
        private ImageIcon images[][] ={{
                        new ImageIcon("images/UpRight.jpg"),
                        new ImageIcon("images/RightDown.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        {new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/DownRight.jpg"),
                        new ImageIcon("images/Horiz.jpg"),
                        new ImageIcon("images/RightDown.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/UpRight.jpg"),
                        new ImageIcon("images/Horiz.jpg"),
                        new ImageIcon("images/RightUp.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/DownRight.jpg"),
                        new ImageIcon("images/RightUp.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg")}};
        private ImageIcon frontImagesTrain[]={
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainRight.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainRight.jpg"),
                        new ImageIcon("images/TrainDown.jpg")};
            private ImageIcon trackImagesTrain[]={
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/RightUp.jpg"),
                    new ImageIcon("images/Horiz.jpg"),
                    new ImageIcon("images/UpRight.jpg"),
                    new ImageIcon("images/RightUp.jpg"),
                    new ImageIcon("images/DownRight.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/UpRight.jpg"),
                    new ImageIcon("images/RightDown.jpg"),
                    new ImageIcon("images/DownRight.jpg"),
                    new ImageIcon("images/Horiz.jpg"),
                    new ImageIcon("images/RightDown.jpg")};
              private ImageIcon carrinImagesTrain[]={
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Right.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Right.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg")};
        private int[]frontPath={13, 18,17,16,21,20,15,10,5,0,1,6,7,8};
      private int[]frontPath2={8, 13,18,17,16,21,20,15,10,5,0,1,6,7};  
        private ImageIcon icon;
        private JLabel labelInfo;
        public Train () {  
           screen = new JPanel(new GridLayout(1,1));
           Font f =new Font ("Sanserif",Font.BOLD,18);
           labelInfo = new JLabel("WELCOM" ,JLabel.CENTER);
           labelInfo.setFont(f);
           screen.setBackground(Color.red);
           screen.add(labelInfo);
           getContentPane().add(BorderLayout.NORTH,screen );
            street = new JButton[5][5];
            area = new JPanel (new GridLayout(5,5));
            for(int r=0; r<5; r++) 
                for (int c=0; c<5; c++){
                    street[r][c] = new JButton("", images[r][c]);
                    area.add(street[r][c]);
            getContentPane().add(BorderLayout.CENTER,area );   
            keybord = new JButton[9];
            controlroom = new JPanel(new GridLayout(5,2));   
    //        ActionHandler handler = new ActionHandler();
            for (int i=0; i <9; i++)
                keybord[i] = new JButton(s);
    keybord[i].addActionListener(this);
    controlroom.add(keybord[i]);
              keybord[i].setEnabled(false);
              keybord[7].setEnabled(true);
    getContentPane().add(BorderLayout.SOUTH,controlroom );
    public void moveTrainFront(){
    int trainPlace1 = trainPlace;
    try{
    if (trainPlace == frontPath.length-1) trainPlace = 0;
    else trainPlace ++;
                   if (carrNum == 0 )
         int i = frontPath[trainPlace]/5;
         int j = frontPath[trainPlace] - i * 5;
         int r = frontPath[trainPlace1]/5;
         int c = frontPath[trainPlace1] - r * 5;
         street[i][j].setIcon(frontImagesTrain[trainPlace]);
         street[r][c].setIcon(trackImagesTrain[trainPlace1]);
                   else
                        int i1 = frontPath[trainPlace]/5;
                        int j1 = frontPath[trainPlace] - i1 * 5;
                        street[i1][j1].setIcon(frontImagesTrain[trainPlace]);     
                        int trainPlace2 = trainPlace;
                        for (int z = 1; z <= carrNum; z++)
    if (trainPlace2 - z < 0) trainPlace2 = 13;
                                  int i2 = frontPath[trainPlace2 - z]/5;
                                  int j2 = frontPath[trainPlace2 - z] - i2 * 5;
                                  street[i2][j2].setIcon(carrinImagesTrain[trainPlace2 - z]);
              int r1 = frontPath[trainPlace1 - carrNum]/5;
                        int c1 = frontPath[trainPlace1 - carrNum] - r1 * 5;
                        street[r1][c1].setIcon(trackImagesTrain[trainPlace1 - carrNum]);
    }catch(ArrayIndexOutOfBoundsException aiex){System.out.println("the array out of index");}
    // Move train Back
    public void moveTrainBack(){
    int trainPlace1 = trainPlace;
    try{
    if (trainPlace == 0) trainPlace = 13;
    else trainPlace--;
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    int r = frontPath[trainPlace1]/5;
    int c = frontPath[trainPlace1] - r * 5;
    street[i][j].setIcon(frontImagesTrain[trainPlace]);
    street[r][c].setIcon(trackImagesTrain[trainPlace1]);
    }catch(ArrayIndexOutOfBoundsException aiex){System.out.println("the array out of index");}
    public void setRest(){
    setStop(true);
              setSpeed(300);
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(trackImagesTrain[trainPlace]);
    trainPlace = 0;
    i = frontPath[trainPlace]/5;
    j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(frontImagesTrain[0]);
    public void setCheck (boolean c)
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(frontImagesTrain[0]);
    check = c ;
    public boolean getCheck (){ return  check ;}
    public void setSpeed (int s){speed = s ;}
    public int getSpeed(){return  speed;}
    public void setStop(boolean s){stopped = s ;}
    public boolean getStop(){return  stopped ;}
    public void setBack(boolean s){back = s ;}
    public boolean getBack(){return  back;}
         public void setAdd(){carrNum++ ;}
    public boolean getAdd(){return  add;}
    // Action
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==keybord[0])//Start
              if (stopped)
              keybord[0].setText("Stop");
                   setStop(false);
                   labelInfo.setText("Running");
    else      
                   {    setStop(true);
                   keybord[0].setText("Start");
                        labelInfo.setText("Stop");
              if(e.getSource()==keybord[1])//Front And Back
              if (!back)
                   setBack(true);
              keybord[1].setText("Front");
                   labelInfo.setText("Back");
              else      
                   setBack(false);
              keybord[1].setText("Back");
                   labelInfo.setText("Front");
              }     else if (e.getSource()==keybord[2])//Fast
              if (speed <= 0)
              labelInfo.setText("You've arrived the maximum speed : " + getSpeed());
              else {      setSpeed(speed  - 10);
                   labelInfo.setText("The Train speed is slow down to : " + getSpeed());
         else if(e.getSource()==keybord[3])//Slow
              {setSpeed(speed + 10);
                    labelInfo.setText("The Train speed is pulled up to : "+getSpeed());
    else if(e.getSource()==keybord[4]) //ADD carrin
                        setAdd();
                        labelInfo.setText("Add Carriage");
              //setStop(false);
    else if(e.getSource()==keybord[5]) //Delete carrin
                   labelInfo.setText("Delete Carrin");
         else if(e.getSource()==keybord[6]) //Rest
                   setRest();     
              labelInfo.setText("Rest");
         else if (e.getSource()==keybord[7]) //Check
         setCheck(true);
         keybord[7].setEnabled(false);
         keybord[0].setEnabled(true);
         keybord[1].setEnabled(true);
         keybord[2].setEnabled(true);
         keybord[3].setEnabled(true);
         keybord[4].setEnabled(true);
         keybord[5].setEnabled(true);
         keybord[6].setEnabled(true);
         keybord[8].setEnabled(true);
         labelInfo.setText("The Train is Checked");
    else if(e.getSource()==keybord[8]) //desiners
         String x = "";
                   labelInfo.setText("Desiners About");
                   JOptionPane.showMessageDialog(null,"The Progect is Under The Auspices of:"
                   + "\n??" + "\n" + "\n ??" +
                   "\n ??" + "\n??" + "\n ??" + "\n" + "\n" + "\n?? " + "\n C 2007");     }     
    This main ..
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.Thread;
    public class TestTrain{     
        public static void main(String[]args){
            Train train = new Train ();
              MoveTrain mt = new MoveTrain(train);
            train.setTitle("Train");
            train.setSize(421,550);
            train.setVisible(true);
            train.addWindowListener (
            new WindowAdapter (){
                 public void windowClosing(WindowEvent e ){
                      System.exit(0);
              mt.start();
    }This Threads
    import java.lang.Thread;
    public class MoveTrain extends Thread {
         Train train ;
        public MoveTrain (Train train){
               this.train= train;
         public void run(){
               while(!train.getCheck());
               while (train.getCheck()){
                    try {sleep (train.getSpeed()); }
                    catch (InterruptedException e ){System.out.println("unknown error");}
                     if (!train.getStop())
                        if(!train.getBack())
                                {train.moveTrainFront();
                          else  train.moveTrainBack();
    }This Link image icon ..
    http://www.geocities.com/alhairan_2003/as/777/UpRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/Vert.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainUp.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainLeft.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainDown.jpg
    http://www.geocities.com/alhairan_2003/as/777/Train.jpg
    http://www.geocities.com/alhairan_2003/as/777/RightUp.jpg
    http://www.geocities.com/alhairan_2003/as/777/RightDown.jpg
    http://www.geocities.com/alhairan_2003/as/777/NoTrack.jpg
    http://www.geocities.com/alhairan_2003/as/777/Horiz.jpg
    http://www.geocities.com/alhairan_2003/as/777/DownRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Up.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Down.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Up.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Down.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Down.jpg
    thanks :)

            String[] car1Names = {
                "Carriage1Down", "Carriage1Left", "Carriage1Down", "Carriage1Right"
            };The first image name should be "Carriage1Up" but it is missing in your directory.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class MC6 implements Runnable, ActionListener {
        JLabel[] grid;
        BufferedImage[] trackImages;
        BufferedImage[] trainImages;
        BufferedImage[][] carImages;
        int[] imageKeys;
        int[] trackKeys;
        int[] forwardKeys;
        int[] reverseKeys;
        int keyIndex = 0;
        int carCount = 0;           // [0 - 3]
        boolean goingAhead = true;
        boolean changeDirections = false;
        Thread thread = null;
        boolean moving = false;
        final int DELAY = 1000;
        public MC6() {
            loadImages();
        public void actionPerformed(ActionEvent e) {
            String ac = e.getActionCommand();
            if(ac.equals("START"))
                changeDirections = false;
                start();
            if(ac.equals("STOP"))
                stop();
            if(ac.equals("FORWARD") || ac.equals("REVERSE"))
                changeDirections = true;
            if(ac.equals("ADD CARRIAGE"))
                carCount += (carCount+1 <= 3) ? 1 : 0;
            if(ac.equals("REMOVE CARRIAGE")) {
                int carIndex = getCarIndex(carCount);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = imageKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));           
                carCount -= (carCount-1 >=0 ) ? 1 : 0;
        public void run() {
            while(moving) {
                // Clear track in preparation for next advance.
                if(changeDirections) {
                    clearTrack();
                    // Adjust keyIndex by one increment in the direction of travel
                    // to allow it to return it to its current position after the
                    // next advance in position (further below).
                    advance();
                    goingAhead = !goingAhead;
                    changeDirections = false;
                } else {
                    // Replace last car with track image before train advances.
                    int carIndex = getCarIndex(carCount);
                    int trackIndex = trackKeys[carIndex];
                    int imageIndex = imageKeys[carIndex];
                    grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));
                // Move to next position on the track.
                advance();
                // Set locomotive.
                setLocomotive();
                // Set the cars following the locomotive.
                setCars();
                try {
                    Thread.sleep(DELAY);
                } catch(InterruptedException e) {
                    System.out.println("interrupted");
                    stop();
        private int getCarIndex(int carNumber) {
            int n = carNumber;
            int index;
            if(goingAhead) {
                index = keyIndex-n;
                if(index < 0)
                    index += trackKeys.length;
            } else {
                index = (keyIndex+n) % trackKeys.length;
            return index;
        private void advance() {
            keyIndex = goingAhead ?
                           (keyIndex+1 > trackKeys.length-1) ? 0 : keyIndex+1
                           (keyIndex-1 < 0) ? trackKeys.length-1 : keyIndex-1;
        private void clearTrack() {
            // Remove all cars from track before direction change.
            for(int j = 0; j < carCount; j++) {
                int carIndex = getCarIndex(j+1);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = imageKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));
        private void setLocomotive() {
            int trackIndex = trackKeys[keyIndex];
            int imageIndex = goingAhead ? forwardKeys[keyIndex]
                                        : reverseKeys[keyIndex];
            grid[trackIndex].setIcon(new ImageIcon(trainImages[imageIndex]));
        private void setCars() {
            for(int j = 0; j < carCount; j++) {
                int carIndex = getCarIndex(j+1);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = goingAhead ? forwardKeys[carIndex]
                                            : reverseKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(carImages[j][imageIndex]));
        private void start() {
            if(!moving) {
                moving = true;
                thread = new Thread(this);
                thread.setPriority(Thread.NORM_PRIORITY);
                thread.start();
        public void stop() {
            moving = false;
            if(thread != null)
                thread.interrupt();
            thread = null;
        private void loadImages() {
            String[] trackNames = {
                "UpRight", "RightDown", "Vert", "DownRight", "Horiz", "RightUp", "NoTrack"
            String[] trainNames = { "TrainUp", "TrainLeft", "TrainDown", "TrainRight" };
            String[] car1Names = {
                "Carriage1Down", "Carriage1Left", "Carriage1Down", "Carriage1Right"
            String[] car2Names = {
                "Carriage2Up", "Carriage2Left", "Carriage2Down", "Carriage2Right"
            String[] car3Names = {
                "Carriage3Up", "Carriage3Left", "Carriage3Down", "Carriage3Right"
            trackImages = getImages(trackNames);
            trainImages = getImages(trainNames);
            BufferedImage[] car1Images = getImages(car1Names);
            BufferedImage[] car2Images = getImages(car2Names);
            BufferedImage[] car3Images = getImages(car3Names);
            carImages = new BufferedImage[][]{ car1Images, car2Images, car3Images };
        private BufferedImage[] getImages(String[] ids) {
            BufferedImage[] images = new BufferedImage[ids.length];
            for(int j = 0; j < ids.length; j++) {
                String path = "images/" + ids[j] + ".jpg";
                try {
                    images[j] = ImageIO.read(new File(path));
                } catch(IOException e) {
                    System.out.println("Read error for " + path +
                                       ": " + e.getMessage());
                    images[j] = null;
            return images;
        private JPanel getCenterComponent() {
            imageKeys = new int[] {
                0, 1, 3, 4, 1,  2,  5,  4,  0,  5,  3,  2,  2, 2
            trackKeys = new int[] {
                0, 1, 6, 7, 8, 13, 18, 17, 16, 21, 20, 15, 10, 5
            forwardKeys = new int[] {
                0, 3, 2, 3, 3,  2,  2,  1,  1,  2,  1,  0,  0, 0
            reverseKeys = new int[] {
                1, 0, 1, 1, 0,  0,  3,  3,  0,  3,  2,  2,  2, 2
            grid = new JLabel[25];
            JPanel panel = new JPanel(new GridLayout(5,0));
            for(int j = 0; j < grid.length; j++) {
                ImageIcon icon;
                int index = getIndexForValue(j);
                if(index != -1) {
                    icon = new ImageIcon(trackImages[imageKeys[index]]);
                } else {
                    icon = new ImageIcon(trackImages[6]);
                grid[j] = new JLabel(icon);
                panel.add(grid[j]);
            return panel;
        private int getIndexForValue(int value) {
            for(int j = 0; j < trackKeys.length; j++) {
                if(value == trackKeys[j])
                    return j;
            return -1;
        private JPanel getControls() {
            String[] ids = {
                "Start", "Stop", "Forward", "Reverse", "Add Carriage", "Remove Carriage"
            JPanel panel = new JPanel(new GridLayout(0,2));
             for(int j = 0; j < ids.length; j++) {
                JButton button = new JButton(ids[j]);
                button.setActionCommand(ids[j].toUpperCase());
                button.addActionListener(this);
                panel.add(button);
            return panel;
        public static void main(String[] args) {
            MC6 test = new MC6();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test.getCenterComponent());
            f.getContentPane().add(test.getControls(), "Last");
            f.pack();
            f.setLocation(200,100);
            f.setVisible(true);
    }

  • Itunes keeps closing as soon as i open it and states 'windows has detected a problem' HELP!!!!

    Help!! Itunes keeps closing straight away and message states 'windows has detected a problem' HELP ASAP PLEASE!!!!

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If you've already tried a complete uninstall and reinstall try opening iTunes in safe mode (hold down CTRL+SHIFT as you start iTunes) then going to Edit > Preferences > Store and turning off Show iTunes in the Cloud purchases. You may find iTunes will now start normally.
    tt2

  • Logical problem using vectors

    Hi and Happy New Year,
    I have a vector in my java application which contains a number of elements that is not fix which means each time the number of elements might change.
    I want to retrieve the elements of the vector 3 by 3 its like table records paging in jsp , asp or php
    - lets say this time i've got 10 elements in my vector , I have to JButtons previous_3 and next_3
    - The first time the program runs I want to get the first three elements of the vector (0 to 2)
    - By clicking on the next_3 button I want to get the next 3 ( 3 to 5) and so on... providing that the exist
    - By clicking on the privious_3 button I want to get the previous 3 ( 0 to 2) in this instance and so on... providing that the exist
    Can anyone give me a hint as how to solve this problem at least give me some ideas cause i am lacking of ideas my brain is frozen, I know that is it more a logical problem that a programming one
    I 've done this kind of thing in Asp and PHP but as I am new to Java
    I just can not figure out how to tackle this issue

    You may want to use the modulus function.
    lets look at an example.
    pseudo code
    vector v = new vector()
    v.size = 10; //lets say there are 10 elements in the vector
    int n = 3; // you want to jump maximum 3 elements each time
    // you can jump 3.3 times before running outide the scope
    // of the vector, well after the third time you must check
    // how many elements that is left in the vector, this is
    // done by modulus n%10 = 1, this means that the last time
    // you can not jump more than 1 element.
    I have to go now so I cant give you any code to cope with the problem, Ill be back in 3 hours, maybe I can give a good axample, but this outline is the way to go.
    TheLaw

  • I have installed photoshop elements 12. when I try use the editing features it said that i must login to Adobe to register the product. but each time i try to it said there is a problem. help the problem stated that the internet is not connected, but that

    i have installed photoshop elements 12.
    when I try use the editing features it said that i must login to Adobe to register the product.
    but each time i try to it said there is a problem.
    help
    the problem stated that the internet is not connected, but that is not the case.

    I had the same issue and I'm running Windows 7.  Tried working with technical support for several hours but they were no help.  They just had me doing the same things over and over, offering no real answers.  I finally got fed up and have decided to return my product for a full refund.

  • How does logical volume helps in performance in AIX..Should have posted IBM

    We are setting up a new DB server and the disks are in RAID5 config,Does putting data and index in different logical volumes helps in performance

    (I hope I'm not falling for April Fools joke here...)
    Hi Maran,
    As someone already answered, if both volumes are striped against all available disks, you can put everything in one volume and expect equal or better performance.
    However, I want to warn you from optimizing the disk structure without knowing that your database will really bottleneck on disk access to index and data blocks. My storage manager and I wasted countless hours with such optimizations before realizing that we are wasting our time because the application code contains so many functions that disk IO is not even close to being an issue.
    -- Chen

  • I can't install the itunes to my windows 7 X86 APPCRASH problem, help me guys

    i can't install the itunes to my windows 7 X86 APPCRASH problem, help me guys??  i don't know what to do..

    Why are you unable to install the iPod Updater? Are you getting an error message? Please be specific.
    Cheers!
    -Bryan

  • Camera (focus) problem - help?

    Duplicate post, please see: Camera (focus) problem - help?
    Message was edited by: Admin Moderator

    Warranty is valid only in country of original purchase. You have to return
    the iPhone to the US for evaluation. Either you return it personally or send
    it to a friend/relative/co-worker in the US to take into Apple. Apple will not
    accept international shipments for evaluation nor will Apple ship out of the
    country after repair/replacement.
    Have you tried the standard trouble shooting steps: restart, restore, restore
    as new iPhone?

  • HT4059 I purchased an iBook and accidentally paused while downloading. Now I cannot download the rest. Message keeps telling to return to purchase site to download, but everything I click on "Download", the message would reappear. Circular logic. Help!

    I purchased A book on iBooks and accidentally paused it while downloading. Now I cannot continue it's downloading. I get a message saying I have already purchased the book and to go to Purchased page to download it. Trouble is, every time I do that, tapping the "Download" button, the same message reappears. EVERY TIME. Circular logic. Help!

    Okay, you need to contact support definitely about what's going on. Here is a form that will send an e-mail into support for you:
    http://www.apple.com/emea/support/itunes/contact.html
    As far as the prices, the difference is likely the laptop version is the SD version and the iPad one is available in HD. That's the only reason you'll see a price difference. It has nothing to do with the device with movies/movie rentals. Apps yes, these no.

  • After update iPhone4 to iOS6, its stuck, showing only USB to iTunes on the screen. What to do, how to solve problem, help

    after update iPhone4 to iOS6, its stuck, showing only USB to iTunes on the screen. What to do, how to solve problem, help 

    Connect your phone to iTunes on your computer like the diagram has indicated and restore the phone

Maybe you are looking for

  • Fonts jagged in InDesign and PDF export

    I've been troubleshooting this issue for days, with no success. I'm using IDCS6 on a MacBook Pro with Mountain Lion, and it probably happens with all fonts, but I've noticed it specifically with "Din mittelschrift" at a large pt. size and 100% magnif

  • Oracle 9i & 10g replicated to MSSQL 2005 Enterprise: Problem !

    Hi, I have been doing some oracle 9i and 10g Replication to MSSQL 2005 Enterprise Database using the SQL 2005 Server Enterprise replication tool. This is working great, however, we recentrly had some problems on the Oracle side getting errors on new

  • Invoke task flow from backing bean?

    Hi, Is there a way to invoke task flow from a backing bean? If yes, how? Thanks in advance

  • IPhone 4.1 USB connection in vehicle?

    I just downloaded 4.1 and every since then I have a USB direct connect in my GMC Sierra it always played the audio from the Iphone and since doing that it has not been able to read it, anyone else having the problem?

  • Problem accessing RFx Response Line Item - Item Specification Group

    Hi There, How does one access the BUYER_SPEC_GROUP collection on the Rfx Line Item Response (ID 772) object?  I've read other posts where people are having difficulty but I wasn't clear on their approach.  I think I'm accessing the BUYER_SPEC_GROUP c