JScrollPane : save positions

I am working on file browser. I have a table in JScrollPane. I want to save position of JScrollPane vertical bar when I select a folder. I realized a class that save value when I select a folder. When I move up it loads these values and sets these properties back. But I have a problem. If I move from a folder with big number of files (maximum is big) to a folder with a few files all works fine.
JScrollPane s =...
s.getVerticalScrollBar().setValue (400);
assert s.getVerticalScrollBar().getValue() == 400;
But if I move from a folder with a few files (maximum is small) t oa folder with a lot of files it doesn't work.
JScrollPane s =...
s.getVerticalScrollBar().setValue (400);
assert s.getVerticalScrollBar().getValue() != 400; //s.getVerticalScrollBar().getValue() == 152 for example
What should I do?

Try something like this:
SELECT substring(I.ItemCode+'XXXXXXXXXXXXXXXXXXXXX',1,18) from OITM I

Similar Messages

  • HELP!!! save position of the components!!!

    Hi!
    I have a JLayeredPane where I insert some images. I move this images. BUT when I press a button (that invoke a ActionListener) all the images return at initial position!!!
    THE PROGRAM:
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import javax.swing.text.*; //per StyledDocument
    import javax.swing.BorderFactory;
    import javax.imageio.*;
    public class mio implements ActionListener,MouseMotionListener,MouseListener{
    JTextArea statusInfo; //info da passare a PROGRAMMA TODO
    JTextArea PASpar; // PARAMETRI X TODO
    JTextArea PASimage; //IMMAGINI X TODO
    Color whitex = new Color(255,255,255);
    Color bluex = new Color(100,105,170);
    Color bluexx = new Color(100,150,170);
    Color redx = new Color(255,0,0);
    JFrame frame; //contiene tutto
    JFrame frameP;
    JMenuBar menu;
    JMenu fileMenu;
    JMenuItem nuovo;
    JMenuItem apriimgf;
    JMenuItem aprimosf;
    JMenuItem salva;
    JMenuItem stampa;
    JMenuItem esci;
    JMenu modMenu;
    JMenuItem annulla;
    JMenu helpMenu;
    JMenuItem help;
    JPanel panel; //contiene oggetti entro menu
    JPanel panel2;
    JPanel panel3; //xbottoni
    JLayeredPane pane;
    JTextArea spiega;
    JTextArea dico2;
    JLayeredPane panelpane; //dove carico img
    JButton apriimg;
    JButton chiudi;
    JButton aprimos;
    JButton ok;
    JButton mosaica;
    JButton superR;
    JButton salvab;
    JButton migliora;
    JButton nuovob;
    int _dragFromX = 0;    // pressed this far inside ball's
    int _dragFromY = 0;
    boolean _canDrag  = false;
    int i;
    int px;
    int py;
    int mousex;
    int mousey;
    int rifno;//x img d riferimento
    int scelta; //1 = immagini 2=mosaico
    int Nimg; // NUMERO IMG KE INSERISCO <= 12
    JLabel image;
    ImageIcon icon;
    int ximg, yimg; //posizione img in panel
    int xgrid,ygrid; //griglia panel
    int[] ximgs,yimgs; //x,y img
    JLabel[] images;
    int hicon,wicon; //h w img
    int[] wimgs,himgs;
    int muovi; //img da muovere nell'array
         public final static int ONE_SECOND = 500; ////
         private JProgressBar progressBar;
         private javax.swing.Timer timer;
         private JButton startButton;
         private LongTask task;
         private JTextArea taskOutput;
    static private String newline = "\n";
    // =================== MAIN
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    mio m = new mio();
    /*public static void main(String argv[]){
         mio m = new mio();
    // ================ COSTRUTTORE
    public mio(){
         rifno = 0;//no img d rif
         Nimg = 0;
         frame = new JFrame("interfaccia");
         PASpar = new JTextArea();
         PASimage = new JTextArea();
         menu = new JMenuBar();
         menu.setOpaque(true);
         menu.setBackground(bluex);
         // ********* Menu file *********
         fileMenu = new JMenu("File");
         fileMenu.setMnemonic(KeyEvent.VK_F);
         nuovo = new JMenuItem("Nuovo");
         nuovo.setMnemonic(KeyEvent.VK_N);
         apriimgf = new JMenuItem("Apri immagini");
    apriimgf.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_1, ActionEvent.ALT_MASK)); //alt+1
         aprimosf = new JMenuItem("Apri mosaico");
    salva = new JMenuItem("Salva");
         salva.setMnemonic(KeyEvent.VK_S);
         esci = new JMenuItem("Esci");
         esci.setMnemonic(KeyEvent.VK_E);
         //********* Menu Modifica ***********
         modMenu = new JMenu("Modifica");
         modMenu.setMnemonic(KeyEvent.VK_M);
         annulla = new JMenuItem("Annulla");
         annulla.setMnemonic(KeyEvent.VK_A);
         // ********* Help Menu *************
         helpMenu = new JMenu("HELP");
         help = new JMenuItem("Help");
         menu.add(fileMenu);
         fileMenu.add(nuovo);
         fileMenu.add(apriimgf);
         fileMenu.add(aprimosf);
         fileMenu.add(salva);
         fileMenu.addSeparator();
         fileMenu.addSeparator();
         fileMenu.add(esci);
         menu.add(modMenu);
         modMenu.add(annulla);
         menu.add(helpMenu);
         helpMenu.add(help);
         // ActionListener x ogni voce d menu
         nuovo.addActionListener(this);
         apriimgf.addActionListener(this);
         aprimosf.addActionListener(this);
         salva.addActionListener(this);
         esci.addActionListener(this);
         annulla.addActionListener(this);
         help.addActionListener(this);
         frame.setJMenuBar(menu);//in frame menu
         panel=new JPanel(new BorderLayout(2,2));
         frame.getContentPane().add(panel);
         spiega = new JTextArea(" 1. Aprire TUTTE le immagini da mosaicare"+ newline +" Oppure il mosaico da migliorare"+newline,3,40);
         spiega.setEditable(false);
         spiega.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
         spiega.setBackground(bluex);
         panelpane = new JLayeredPane();
         panelpane.setPreferredSize(new Dimension(900,550));
         panelpane.setBackground(whitex);
         panelpane.setLayout(new GridLayout(0,4)); //max 12 img e occupano tutto subito
         panelpane.setBorder(BorderFactory.createLineBorder(Color.black));
         panelpane.addMouseListener(this);
         panelpane.addMouseMotionListener(this);
         xgrid = 225;
         ygrid =183;
         ximg = 0;
         yimg = 0;
         images = new JLabel[12];//immagini
         ximgs = new int[12];
         yimgs = new int[12];
         wimgs = new int[12];
         himgs = new int[12];
         panel3= new JPanel();
         panel3.setBackground(bluex);
         panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS));
         panel3.setBorder(BorderFactory.createLineBorder(Color.black));
         chiudi = new JButton("Chiudi applicazione");
         chiudi.addActionListener(this);
         chiudi.setBackground(bluex);
         // ******* 1 FRAME
         apriimg = new JButton("Apri immagine");
         apriimg.addActionListener(this);
         apriimg.setBackground(bluex);
         aprimos = new JButton("Apri mosaico");
         aprimos.addActionListener(this);
         aprimos.setBackground(bluex);
         ok = new JButton("Prosegui");
         ok.addActionListener(this);
         ok.setBackground(bluex);
         ok.setEnabled(false); //disabilito
         //****** 2 frame
         mosaica = new JButton(" Mosaica ");
         mosaica.addActionListener(this);
         mosaica.setBackground(bluex);
         mosaica.setVisible(false);
         superR = new JButton("Super-Risoluzione");
         superR.addActionListener(this);
         superR.setBackground(bluex);
         superR.setVisible(false);
         // ********* 3 frame
         salvab = new JButton(" Salva mosaico ");
         salvab.addActionListener(this);
         salvab.setBackground(bluex);
         salvab.setVisible(false);
         migliora = new JButton(" Migliora mosaico ");
         migliora.addActionListener(this);
         migliora.setBackground(bluex);
         migliora.setVisible(false);
         nuovob = new JButton(" Nuovo progetto ");
         nuovob.addActionListener(this);
         nuovob.setBackground(bluex);
         nuovob.setVisible(false);
         statusInfo = new JTextArea(3,40);
         statusInfo.setBorder(BorderFactory.createLineBorder(Color.black));
         statusInfo.setBackground(bluex);
         JScrollPane scrollArea = new JScrollPane(statusInfo);
         panel.add((spiega), BorderLayout.NORTH);
         panel.add((panelpane), BorderLayout.CENTER);
         panel.add((panel3), BorderLayout.EAST);
         panel.add((scrollArea), BorderLayout.SOUTH);
         panel3.add(apriimg);
         panel3.add(salvab);//3 frame
         panel3.add(new JSeparator(JSeparator.HORIZONTAL));
         panel3.add(aprimos);
         panel3.add(mosaica); // 2 frame
         panel3.add(migliora);
         panel3.add(new JSeparator(JSeparator.HORIZONTAL));
         panel3.add(ok);
         panel3.add(superR); // 2 frame
         panel3.add(nuovob); // 3 frame
         panel3.add(new JSeparator(JSeparator.HORIZONTAL));
         panel3.add(chiudi);
         frame.pack();
         frame.setVisible(true);
         frame.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) {
                   System.exit(0);
    }// chiude costruttore
    // ================ metti mosaico
         public void mettiMosaico(){
              panelpane.removeAll();
              ImageIcon img1 = new ImageIcon("mosaico.jpg");
              Image imgesize1 = resize2Icon("mosaico.jpg"); // resize
              img1 = new ImageIcon(imgesize1);
              JLabel image1 = new JLabel(img1);
              image1.setLocation(200,10);
              panelpane.add(image1);
              panelpane.repaint();
    // ================= RESIZE MOSAICO
         public Image resize2Icon(String image){
         Image img;
              Image inImage = new ImageIcon(image).getImage();
              int maxDim = 500;
              double scale = (double) maxDim / (double) inImage.getHeight(null);
              if (inImage.getWidth(null) > inImage.getHeight(null))
                   scale = (double) maxDim / (double) inImage.getWidth(null);
              // Determine size of new image.
              //One of them
              // should equal maxDim.
              int scaledW = (int) (scale * inImage.getWidth(null));
              int scaledH = (int) (scale * inImage.getHeight(null));
              System.out.println(">> "
                   + inImage.getSource().getClass()
                   + " aspect ratio = "
                   + scaledW + " , " + scaledH);
              img = inImage.getScaledInstance(scaledW , scaledH, Image.SCALE_SMOOTH);
         return img;
    // ================= RESIZE IMAGES
    public Image resizeIcon(String image){
         Image img;
              Image inImage = new ImageIcon(image).getImage();
              int maxDim = 180;
              double scale = (double) maxDim / (double) inImage.getHeight(null);
              if (inImage.getWidth(null) > inImage.getHeight(null))
                   scale = (double) maxDim / (double) inImage.getWidth(null);
              // Determine size of new image.
              //One of them
              // should equal maxDim.
              int scaledW = (int) (scale * inImage.getWidth(null));
              int scaledH = (int) (scale * inImage.getHeight(null));
              System.out.println(">> "
                   + inImage.getSource().getClass()
                   + " aspect ratio = "
                   + scaledW + " , " + scaledH);
              img = inImage.getScaledInstance(scaledW , scaledH, Image.SCALE_SMOOTH);
              return img;
    // ================== img RIFERIMENTO
         public void imgRif(){
              frameP.setVisible(false);//tolgo frame
              rifno=1;
              spiega.setText (" Con il mouse indicare l'immagine di riferimento"+newline);
         }//fine imgRif
    // ================== BARRA PROGRESS
         public void barraP(){
              final JFrame framePb = new JFrame("ELABORAZIONE in corso");
              framePb.setSize(300,1000);
              framePb.setBackground(bluex);
              statusInfo.append(" Elaborazione in corso... "+newline);
              JPanel panelPb=new JPanel(new BorderLayout());
              panelPb.setBackground(bluex);
              panelPb.setBorder(BorderFactory.createLineBorder(Color.black));
              panelPb.setPreferredSize(new Dimension(300,100));
              framePb.getContentPane().add(panelPb);
         task = new LongTask();
              progressBar = new JProgressBar(0, task.getLengthOfTask());
         progressBar.setValue(0);
         progressBar.setStringPainted(true);
         panelPb.add(progressBar);
         //Create a timer.
         timer = new javax.swing.Timer(ONE_SECOND, new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
              progressBar.setValue(task.getCurrent());
              String s = task.getMessage();
              if (task.isDone()) {
                   Toolkit.getDefaultToolkit().beep();
                   timer.stop();
                             statusInfo.append(" Eseguita elaborazione "+newline);
                             spiega.setText (" 4. Migliora, Salva, Nuovo progetto o Esci"+newline);
                             superR.setVisible(false);
                             mosaica.setVisible(false);
                             salvab.setVisible(true);
                             migliora.setVisible(true);
                             nuovob.setVisible(true);
                             framePb.setVisible(false);
                   framePb.setCursor(null); //turn off the wait cursor
                   progressBar.setValue(progressBar.getMinimum());
                             //panelpane.removeAll();
                             //inserisco mosaico creato
              framePb.pack();
              framePb.setVisible(true);
              framePb.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
         task.go();
         timer.start();
              framePb.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
    // ===================================================================================== EVENTI
    public void actionPerformed(ActionEvent e) {
         Object source = e.getSource(); //chi ha invocato evento
    // ====================================================================================== NUOVO
         if((source == nuovo)||(source == nuovob)){
              System.out.println("Nuovo");
              mio m = new mio();
    // ====================================================================================== HELP
         if(source == help){
              System.out.println("Help");
              final JFrame framePh = new JFrame(" - H E L P - ");
              framePh.setSize(300,1000);
              JTextArea help=new JTextArea(" Help per utente! "+newline,5,40);
              help.setEditable(false);
              help.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
              //help.setBackground(bluex);
              JButton escih = new JButton(" Esci ");
              escih.setBackground(bluex);
              escih.addActionListener(new ActionListener(){ //quando premo esci
              public void actionPerformed(ActionEvent e){
                             framePh.setVisible(false); // SQUALLIDO! esci meglio!
              framePh.getContentPane().add(help);
              framePh.pack();
              framePh.setVisible(true);
    // ======================================================================================== APRI
         if((source == apriimgf) || (source == apriimg)){ //apri + img
              System.out.println("Apri");
              scelta=1; //immagini
              Image imgresize;
              JFileChooser fileChooser = new JFileChooser();
              fileChooser.addChoosableFileFilter(new ImageFilter());//filtro
              fileChooser.setAcceptAllFileFilterUsed(false);
              fileChooser.setAccessory(new ImagePreview(fileChooser));//anteprima
              fileChooser.setCurrentDirectory(new File("."));
         fileChooser.setMultiSelectionEnabled(true);
         int status = fileChooser.showOpenDialog(null);
              if (status == JFileChooser.APPROVE_OPTION) {
         File selectedFiles[] = fileChooser.getSelectedFiles();
                   if (selectedFiles.length>12){
                        System.out.println("selezionati piu' di 12 img");
                        return;
                   if (Nimg>12){
                        System.out.println("Ho piu' di 12 img");
                        return;
                   //int imgora = Nimg + selectedFiles.length; //immagini totali caricate fin'ora
                   int imgPrima = Nimg; //img prima di inserire le selezionate
                   int imgIns = selectedFiles.length; //immagini inserite ora.
              for (int im=0,n=selectedFiles.length; im<n; im++) {
                        icon = new ImageIcon(selectedFiles[im].getAbsolutePath());
                        statusInfo.append(" Inserito: " + selectedFiles[im].getName() + newline);
                        int hicon = icon.getIconHeight();
                        int wicon = icon.getIconWidth();
                        if ((hicon>183)||(wicon>225)){
                             imgresize = resizeIcon(selectedFiles[im].getAbsolutePath()); // resize
                             icon = new ImageIcon(imgresize);
                        if (ximg>675){
                             if (yimg>366){
                                  System.out.println(" TROPPE IMG!!! ");
                             else{
                             ximg=0;
                             yimg=yimg+ygrid;
                        image = new JLabel(icon);
                        image.setBounds(ximg,yimg,hicon,wicon);
                        //aggiorno dati IMMAGINI
                        yimgs[im+imgPrima]=yimg;
                        ximgs[im+imgPrima]=ximg;
                        images[im+imgPrima] = image;
                        himgs[im+imgPrima] = hicon;
                        wimgs[im+imgPrima] = wicon;
                        statusInfo.append("");
                        panelpane.add(images[im+imgPrima], new Integer(0),12-(im+imgPrima)); //ULTIMA SOPRA
                        //images[im+imgPrima].setLocation(ximgs[im+imgPrima],yimgs[im+imgPrima]);
                        ximg = ximg + xgrid;
                        Nimg=Nimg+1; //n img totale
                        ok.setEnabled(true); //abilito
                        aprimos.setEnabled(false); //abilito
                        spiega.setText (" 2.Con il mouse spostare le immagini creando un 'mosaico'"+newline);
    // ============================================================================= apri mosaico
         if((source == aprimos)||(source == aprimosf)){
              System.out.println("Apri mosaico");
              scelta=2; //mosaico
              JFileChooser fileChooser = new JFileChooser();
              fileChooser.addChoosableFileFilter(new ImageFilter());//filtro
              fileChooser.setAcceptAllFileFilterUsed(false);
              fileChooser.setAccessory(new ImagePreview(fileChooser));//anteprima
              fileChooser.setCurrentDirectory(new File("."));
         fileChooser.setMultiSelectionEnabled(false);
         int status = fileChooser.showOpenDialog(null);
         if (status == JFileChooser.APPROVE_OPTION) {
         File selectedFile = fileChooser.getSelectedFile();
                   icon = new ImageIcon(selectedFile.getAbsolutePath());
                        int hicon = icon.getIconHeight();
                        int wicon = icon.getIconWidth();
                        image = new JLabel(icon);
                        image.setBounds(ximg,yimg,hicon,wicon);
                        statusInfo.append("");
                        panelpane.add(image,new Integer(1),1);//dopo sopra
                        ok.setEnabled(true); //abilito
                        apriimg.setEnabled(false); //abilito
                        aprimos.setEnabled(false); //abilito
                        spiega.setText (" 2. Proseguire"+newline);
    // =============================================================================== SALVA
         if(source == salva){
              System.out.println("Salva");
              try {
              FileOutputStream fos = new FileOutputStream ("info.doc"); //doc.ser
              ObjectOutputStream oos = new ObjectOutputStream (fos);
              String infoo = statusInfo.getText(); // NON E' GIUSTO!!!
              oos.writeObject(infoo);
              oos.flush();
              oos.close();
              statusInfo.append(" Salvato il progetto in: info.doc"+newline);
              } catch (IOException e1) {
                   statusInfo.setText (" Unable to save");
                   e1.printStackTrace(); //scrivo eccezione
    // =============================================================================== PROSEGUI
         if(source == ok){
              System.out.println("Prosegui");
              apriimg.setVisible(false);
              aprimos.setVisible(false);
              ok.setVisible(false);
              mosaica.setVisible(true);
              panelpane.removeMouseMotionListener(this);
              if (scelta==1){
                   superR.setVisible(true);
                   panelpane.revalidate ();
                   spiega.setText (" 3. Scegliere Mosaicatura o Super-Risoluzione"+newline);
              }else{
                   panelpane.revalidate ();
                   spiega.setText (" 3. Eseguire Mosaicatura"+newline);
    // ================================================================================= ESCI
         if((source == esci)||(source==chiudi)){
              System.out.println("Esci");
              System.exit(0);
    // =================================================================================== ANNULLA
         if(source == annulla){
              System.out.println("Annulla");
    // ======================================================================================== MOSAICA
         if(source == mosaica){
              System.out.println("Mosaica");
              frameP = new JFrame("Parametri di Mosaicatura");
              frameP.setSize(800,800);
              frameP.setBackground(bluex);
              JPanel panelP=new JPanel(new GridLayout(1,0));
              panelP.setBackground(bluex);
              panelP.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.setPreferredSize(new Dimension(500,500));
              frameP.getContentPane().add(panelP);
              JPanel panelP0 = new JPanel(new FlowLayout()); //avvia
              panelP0.setBackground(bluex);
              panelP0.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.add(panelP0);
              JPanel panelP1 = new JPanel(new FlowLayout());//parametri
              panelP1.setBackground(bluex);
              //panelP1.setLayout(new BoxLayout(panelP1, BoxLayout.Y_AXIS));
              panelP1.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.add(panelP1);
              JPanel panelP2=new JPanel(new FlowLayout());
              panelP2.setBackground(bluex);
              panelP2.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.add(panelP2);
              //**************** panel 1 : PARAMETRI
              JTextArea dico3 = new JTextArea(" Parametri di miscelazione",10,40);
              dico3.setEditable(false);
              dico3.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
              JRadioButton primo = new JRadioButton("First frame");
              primo.setActionCommand("first");
              primo.setSelected(true);
              primo.setBackground(bluex);
              JRadioButton secondo = new JRadioButton("Last frame");
              secondo.setActionCommand("last");
              secondo.setBackground(bluex);
              JRadioButton terzo = new JRadioButton("Average");
              terzo.setActionCommand("average");
              terzo.setBackground(bluex);
              JRadioButton quarto = new JRadioButton("Median");
              quarto.setActionCommand("median");
              quarto.setBackground(bluex);
              JRadioButton quinto = new JRadioButton("Feathering");
              quinto.setActionCommand("feathering");
              quinto.setBackground(bluex);
              final ButtonGroup group = new ButtonGroup(); //raggruppo x fare esclusione
              group.add(primo);
              group.add(secondo);
              group.add(terzo);
              group.add(quarto);
              group.add(quinto);
              // ******** panel 0 : avvia
              JTextArea dico = new JTextArea(" Se si vuole avviare la mosaicatura premere 'Avvia'" newline" in tal caso se non sono stati settati parametri verranno utilizzati quelli di default",10,40);
              dico.setEditable(false);
              dico.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
              JButton ok1 = new JButton("Avvia");
              ok1.setBackground(bluex);
              ok1.addActionListener(new ActionListener(){ //quando premo ok ...
              public void actionPerformed(ActionEvent e){
                        String command = group.getSelection().getActionCommand();
                   statusInfo.append(" Parametri di mosaicatura, miscelazione: "+command + newline);
                        frameP.setVisible(false); // SQUALLIDO! esci meglio!
                        barraP();
                        mettiMosaico();
              // ******** panel 2 : IMG RIFERIMENTO
              dico2 = new JTextArea(" Per impostare l'immagine di riferimento" newline " premere 'Imposta' e selezionare l'immagine "+newline,10,40);
              dico2.setEditable(false);
              dico2.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
              JButton imposta = new JButton("Imposta");
              imposta.setBackground(bluex);
              imposta.addActionListener(new ActionListener(){ //quando premo ok ...
         public void actionPerformed(ActionEvent e){
                        String command = group.getSelection().getActionCommand();
                        imgRif();
              panelP1.add(dico3);
              panelP1.add(primo);
              panelP1.add(secondo);
              panelP1.add(terzo);
              panelP1.add(quarto);
              panelP1.add(quinto);
              panelP0.add(dico);
              panelP0.add(ok1);
              panelP2.add(dico2);
              panelP2.add(imposta);
              primo.addActionListener(this);
              secondo.addActionListener(this);
              JTabbedPane tabbedPane = new JTabbedPane(); //a schedario
              tabbedPane.setBackground(bluex);
              tabbedPane.addTab("Avvia Mosaicatura", null, panelP0, null);
              tabbedPane.addTab("Parametri", null, panelP1, null);
              tabbedPane.addTab("Img Riferimento", null, panelP2, null);
              tabbedPane.setSelectedIndex(0);
              panelP.add(tabbedPane);
              frameP.pack();
              frameP.setVisible(true);
    // ========================================================================== super risoluzione
         if(source == superR){
              System.out.println("Super-risoluzione");
              final JFrame frameP = new JFrame("Parametri di Super-risoluzione");
              frameP.setSize(800,800);
              frameP.setBackground(bluex);
              JPanel panelP = new JPanel(new GridLayout(1,0));
              panelP.setBackground(bluex);
              panelP.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.setPreferredSize(new Dimension(500,500));
              frameP.getContentPane().add(panelP);
              JPanel panelP0 = new JPanel(new FlowLayout()); //avvia
              panelP0.setBackground(bluex);
              panelP0.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.add(panelP0);
              JPanel panelP1 = new JPanel(new FlowLayout());//parametri
              panelP1.setBackground(bluex);
              panelP1.setBorder(BorderFactory.createLineBorder(Color.black));
              panelP.add(panelP1);
              //**************** panel 1 : PARAMETRI
              JTextArea dico3 = new JTextArea(" Parametri di super-risoluzione",10,40);
              dico3.setEditable(false);
              dico3.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
              JRadioButton primo = new JRadioButton("Nearest");
              primo.setActionCommand("nearest");
              primo.setSelected(true);
              primo.setBackground(bluex);
              JRadioButton secondo = new JRadioButton("Weighted");
              secondo.setActionCommand("weighted");
              secondo.setBackground(bluex);
              final ButtonGroup group = new ButtonGroup(); //raggruppo x fare esclusione
              group.add(primo);
              group.add(secondo);
              // ******** panel 0 : avvia
              JTextArea dico = new JTextArea(" Se si vuole avviare la super-risoluzione premere 'Avvia'" newline" in tal caso se non sono stati settati parametri verranno utilizzati quelli di default",10,40);
              dico.setEditable(false);
              dico.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
              JButton ok1 = new JButton("Avvia");
              ok1.setBackground(bluex);
              ok1.addActionListener(new ActionListener(){ //quando premo ok ...
              public void actionPerformed(ActionEvent e){
                        String command = group.getSelection().getActionCommand();
                   statusInfo.append(" Parametri super-risoluzione: "+command + newline);
                        frameP.setVisible(false); // SQUALLIDO! esci meglio!
                        barraP();
              panelP1.add(dico3);
              panelP1.add(primo);
              panelP1.add(secondo);
              panelP0.add(dico);
              panelP0.add(ok1);
              primo.addActionListener(this);
              secondo.addActionListener(this);
              JTabbedPane tabbedPane = new JTabbedPane(); //a schedario
              tabbedPane.setBackground(bluex);
              tabbedPane.addTab(" Avvia super-risoluzione", null, panelP0, null);
              tabbedPane.addTab(" Parametri", null, panelP1, null);
              tabbedPane.setSelectedIndex(0);
              panelP.add(tabbedPane);
              frameP.pack();
              frameP.setVisible(true);
              mettiMosaico();
    // ===================================================== Mouse Event
    public void mousePressed(MouseEvent e) {
         mousex = e.getX(); // Save the x coord of the click
    mousey = e.getY(); // Save the y coord of the click
         for (int m=0; m<Nimg; m++){
              Point p = images[m].getLocation(); //posizione img[m] in panel
              px = (int)p.getX();
              py = (int)p.getY();
              if (mousex >= px && mousex <= (px+images[muovi].getWidth())
    && mousey >= py && mousey <= (py+images[muovi].getHeight())) {//se mouse dentro img
                   _canDrag = true;
              _dragFromX = mousex-px;  // how far from left
              _dragFromY = mousey-py;  // how far from top
                   muovi = m; //setto immagine da muovere!!!!
                   if (rifno==0){panelpane.moveToFront(images[muovi]);}//davanti img ke muovo
                   //se =1 nn mi muove img
         }//chiudo FOR
         if (rifno==1){
              statusInfo.append(" Immagine di riferimento: "+ muovi + newline);
              frameP.setVisible(true);
              dico2.append(" Immagine di riferimento impostata :"+muovi + newline);
              rifno=0;
    public void mouseDragged(MouseEvent e) {
         if (_canDrag) {   // True only if button was pressed inside ball.
    //--- Ball pos from mouse and original click displacement
    int ballX = e.getX() - dragFromX;
    int ballY = e.getY() - dragFromY;
         images[muovi].setLocation(_ballX,_ballY);
    //--- Don't move the ball off the screen sides
    ballX = Math.max(ballX, 0);
    ballX = Math.min(ballX, panelpane.getWidth() - images[muovi].getWidth());
    //--- Don't move the ball off top or bottom
    ballY = Math.max(ballY, 0);
    ballY = Math.min(ballY, panelpane.getHeight() - images[muovi].getHeight());
         Point p = images[muovi].getLocationOnScreen();
         int px = (int)p.getX();
         int py = (int)p.getY();
    //panelpane.repaint(); // Repaint because position changed.
         public void mouseExited(MouseEvent e) {
         _canDrag = false;
         }//end mouseExited
    public void mouseEntered (MouseEvent e) {} // ignore these events
    public void mouseClicked (MouseEvent e) {
    public void mouseReleased(MouseEvent e) {
              //e.consume();
    } // ignore these events
    public void mouseMoved(MouseEvent e) {}
    }// chiude classe

    please reuse the threads you've already started on this topic
    http://forum.java.sun.com/thread.jspa?threadID=573384&tstart=50
    and also, use the [url http://forum.java.sun.com/help.jspa?sec=formatting]formatting tags when posting code.
    keep in mind, this is an awful lot of code, and few will have the time to read through all of it, so if at all possible, make a smaller example case for your problem when you can so that we don't have to try to sort through hundreds of lines of code to find what you want to do.

  • JScrollPane Scroll Position

    Tried posting this in the newbie section with no luck....
    I created a class extending a JScrollPane that encompasses a JTextPane. The method below appends some text to the current JTextPane with a certain color (this part works fine). What I am also trying to do is force the JScrollPane to keep focus at the bottom after the append if it was there before the append. Now I am running into trouble.
    The code can determine fine if the scroll pane is at the end, but after the append, it sometimes prematurely puts the pane at the end again; i.e. the method is telling the scroll pane to go to the end before the text pane and/or scroll pane have finished updating their size. Thus, the scroll pane is moved to the bottom, then the text and scroll panes resize, and the scroll pane is no longer at the bottom.
    It seems that this problem occurs when the text appended is multiple lines, in which case it appears that the panes are resized multiple times- the scroll bar is positioned correctly after the first resize, but subsequent resizings sometimes occur after I reposition the scroll bar to the current "end" (which then changes).
    I've tried validating both panes to force them to update before repositioning the scroll bar, but this does not seem to stop the problem (although it may help).
    Does anyone know how to correct this problem? I'm still guessing that something (perhaps the doc?) is not fully updated by the time I reposition the scroll bar. If this is the problem, any suggestions on how to force the document to be updated before playing with these GUI panes? If possible, I prefer not to use a timer or sleep a thread to wait for this updating.
    Of course, if you know of existing methods/settings that help with this, please tell. I didn't manage to find anything in the API's that gave me what I want, but I've been known to overlook things from time to time ;)
    Again, this is a method in a class extending JScrollPane.
    textPane is the JTextPane embedded in the scroll pane.
    doc is the JTextPane document.
    public synchronized void append(String appendString, Color textColor)
         JScrollBar scrollBar;
         BoundedRangeModel rangeModel;
         boolean isMaxed;
         scrollBar = this.getVerticalScrollBar();
         rangeModel = scrollBar.getModel();
         isMaxed = ((rangeModel.getValue() + rangeModel.getExtent())
                             == rangeModel.getMaximum());
              // check if the scroll bar is at the bottom
         SimpleAttributeSet textAttributes = new SimpleAttributeSet();
         StyleConstants.setForeground(textAttributes, textColor);
         try
              doc.insertString(doc.getLength(), appendString, textAttributes);
              // append the formatted string to the document
         catch(BadLocationException ex)
              System.out.println("Error writing to the text pane");
         if (isMaxed)
              textPane.validate();     //force the text pane to validate
              this.validate();    //force the scroll pane to update
              scrollBar.setValue(rangeModel.getMaximum() - rangeModel.getExtent());
              // The above line is sometimes called before the text and scroll panes
              // have finished updating.  The maximum and extent of the scroll bar
              // depend on the size of the document.

    You are correct in your observation that the size of the JScrollPane is incorrectly reflected for the size of your newly appended document. I spent some time on this bug and eventually came up with the following solution:
    textPane.addComponentListener( new ComponentListener(){
    public void componentHidden(ComponentEvent e)
    public void componentMoved(ComponentEvent e)
    public void componentResized(ComponentEvent e)
    JViewport vp = scrollPane.getViewport();
    incoming.revalidate();
    Rectangle visRect = vp.getViewRect();
    Dimension viewDim = vp.getViewSize();
    Rectangle rect = new Rectangle( 0, (int)(viewDim.getHeight() - visRect.getHeight()),
    (int)visRect.getWidth(), (int)visRect.getHeight() );
    vp.scrollRectToVisible( rect );
    public void componentShown(ComponentEvent e )
    This solution also has the side benefit of scrolling to the bottom when the JTextPane is resized by the user.

  • JScrollPane resets position after JTable.changeSelection

    I have JTable inside JScrollPane (what a surprise!). Table has some 20 columns, and only 10 are shown at once. If a user scrolls to the right to see the last few columns, and after that I change selection in JTable using
    jTable.changeSelection(newSelectedRow, 0, false, false);
    JScrollPane resets it's position to show first columns again, and user has to scroll again to the left.
    I solved this by
    Point p=scrollPane.getViewport().getViewPosition();
    jTable.changeSelection(newSelectedRow, 0, false, false);
    scrollPane.getViewport().setViewPosition(p);
    Iz works, but the table first renders first 10 columns and then scrolls to the left, which is annoying.
    Is there any other way?

    jTable.changeSelection(newSelectedRow, 0, false, false);Well your are telling it to go to the specified row and column(0).
    Two options:
    a) get the current view X position and determine which column this represents and set the column accordingly
    b) use setAutoscrolls( false );

  • Library gone, ipod freezes with sync, and won't save positions in videos

    Wow. Three major issues with iTunes/my iPod in three days. Have I set some kind of a record here?
    Well, first off... I went to charge my iPod with the usb cable as I always do. iTunes is configured to pop up and sync with the ipod each time it sees that the device is connected. All seemed well, until I saw a message telling me the library on my computer did not match the one on my iPod. Basically asked me if I wanted to wipe out the music/video collection on the iPod and replace it with, well, NOTHING which is what appears to be in my iTunes library right now. That's right, my library is all gone. No big deal, right? Just point iTunes back to my media folders! Not cool. I've pruned SO MANY horrible songs within itunes without deleting the actual song files. my iPod will be getting at least 250+ songs I do NOT want to bring to work, or on my commute. I don't have my library backed up. Why would I? This should not happen. I did nothing to cause it, there's no "iTunes virus" which wipes our your library, is there?
    Next problem... This morning when I gave my iPod a quick charge before work... Hold switch on "hold," iTunes hadn't popped up during the 30 mins I left it in.. Guess what? The iPod is frozen. Reset it. This'll be the third or fourth time this has happened to me.
    Lastly, I've noticed that the iPod simply WILL NOT save the position I was at before shutting down the iPod after a viewing "session." No, that's not true. It will revert to some random spot in the video I was watching, perhaps the first "bookmark" I'd made, the first time I'd quit in the middle of a video. Every time after that it won't continue where I'd left off, but rather at that first spot in the video. This isn't a problem for ALL of my videos, just some.
    And a fourth bonus problem:: When am I going to be able to categorize my non-purchased videos properly? I complained about this like 2 months ago and iTunes still hasn't been "fixed." I'm limited to keeping non-purchased videos under "music videos" which is just stupid.
    Homemade   Windows XP Pro  

    First off, you have to search the system for your purchased songs. There usually in the My Music/iTunes/iTUnes Music/(Artist name)/(Album Name)
    If you can not find them there then search the system by going to start button>Search and type in the search m4p for audio and m4v for video. more on this here http://docs.info.apple.com/article.html?artnum=301749
    Its true apple doesn't offer redownloads BUT alot of people including me, have had success in emailing the music store, telling them what has happened, and getting an offer to "Redownload" all the songs paid for
    Far as the malware goes, you have some type of malware on the system, if you didn't ewido wouldn't of sent off an alarm with a sound and you wouldn't have been removeing things with it. malware comes in many forms, sometimes installed by that "Free" program you get off the net, sometimes installed in the background when you goto a certain site. In some cases simply rolling the mouse pointer over an ad on a web page (Which is easy to do when its beside the scroll bar to the right) will have it install. I have 3 different adware scanners and still get one or 2 that gets thru now and then

  • Save position awesome

    halo, i'm using awesome3 and i'm searching if there's the possibility to save the window's position with the floating layout, do you know anything anout this? thanks

    I don't think Awesome can remember precise placement on a per-app basis.  You can use a session manager, plus the "rules" section of rc.lua to assign apps to specific tags and assign default layouts to each tag. You'll still need to rearrange individual clients, but it'll take some of the tedium out of it.  I'd be willing to bet you could write some lua scripts to get more precise placement, but probably not to remember exactly where each client was on reboot.

  • [iOS][Playlists] Save Position when you are offline

    Hello, I am using the Spotify App on my iPhone 4s. With the newest IOS Update my Phone can use only a smal main memory for other Apps. So the Problem is that the IOS automatily closes Apps which are not used in a while. That means, when I am using my Spotify-App offline and then have to study, the App has to reload when I want to use it again. The actually Position is then lost and I have to "re-shuffel" my Playlist. The thing is, that I am hearing then the same music I already heared again. Is there a possibility to save the position an maybe the already played songs from the Playlist? Maybe you can also add the funktion how often you played the song already, so you can improve the shuffle option to play the rarely-played songs. I hope you can use this Idea on your next  Update, and i am sorry for the bad English! Rugata

    Updated: 2015-07-13Hello and thanks for the feedback!
    Any news regarding this request will be announced in the original idea topic here:
    https://community.spotify.com/t5/Live-Ideas/quot-Smart-quot-shuffle-function/idi-p/806817
    Please add your kudos and comments there, if you haven't already. ;)

  • Save position of right hand as "home"-position

    When the Kinect has tracked my right hand (JointType.HandRight), I want it to save the current position of the hand as a "home"-position which later can be referred to when for example my right hand moves to the right from the "home"-position.
    I'm a novice in programming and would highly appreciate code for show and an explanation (and note if there's anything in the existing code that's wrong or missing)! Thanks!
    // Find the right hand joint
    IList<Microsoft.Kinect.Body> bodies;
    void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
    var reference = e.FrameReference.AcquireFrame();
    using (var frame = reference.BodyFrameReference.AcquireFrame())
    if (frame != null)
    bodies = new Microsoft.Kinect.Body[frame.BodyFrameSource.BodyCount];
    frame.GetAndRefreshBodyData(bodies);
    foreach (var body in bodies)
    if (body != null)
    if (body.IsTracked)
    // Find the joint
    Joint handRight = body.Joints[Microsoft.Kinect.JointType.HandRight];
    // Around here maybe having the code which saves the current position as "home"

    I could make an IF code line where if I close my hand, the kinect will respond to that action as saving that position as "home" and while I have my hand closed the robot will respond when I move my hand from that positioned home. How do I perform
    what you said in the following: "Then you could compute for each body frame, what is the position vector from the home point and make your robot move depending on than vector"? I suppose you'r talking about making the work space in x, y, z work as
    the robot will perform the same movement as my hand? I'm right now a little of a novice in programming as I've gotten a little rusty while I haven't programmed that much during the years. I've checked the Kinect v2 documentation but I don't know what information
    nor code I could use.
    I have watched the jump start videos and they gave me a better understanding in the kinect but didn'tfeel that
    they were helpful for the coding and
    for my specific work, but I could be wrong.
    Once again I've haven't got a good understanding of the differences yet so if you say body frame is enough
    you'r probably right, could you tell me the differences?
    And do I change
    thus only the multisource for the body frame in the code?
    Thank you for the help and sorry for my late response!

  • JScrollPane static positioning

    How can I set the size of a JScrollPane within a contentPane if I want the contentPane to act as a transparent layer over an html form? I would like the content pane to be the same size as the form so I can position the JScrollPane over a position in the html form. Sorry my explanation is so horrible.
    Thanks

    Swing related questions should be posted in the Swing forum.
    The scrollbars will appear automatically when the preferred size of the component added to scroll pane is greater than the size of the scroll pane.
    When you use a LayoutManager the preferred size is calculated automatically.
    When you use absolute positioning you are responsible for setting the preferred size of the component.

  • SAVE POSITIONS OF THE COMPONENTS!!! HELP!!!

    HI!!!
    I don't understand!!!
    I insert images in JLayeredPane, I move this images, BUT when i press a button (invoke ActioListener) the images become in initial position!!!
    HELP ME!!!!!!!

    Don't clutter the forum by posting the [url
    http://forum.java.sun.com/thread.jspa?threadID=573772]
    same question three times.Why did you change your userid from this [url
    http://forum.java.sun.com/thread.jspa?threadID=573384]
    posting. If you are not the same person then
    you are both working on the same assignment and
    should get together to solve your problem.
    When I replied to the above posting I tried to
    explain what the problem was. If you didn't
    understand the explanation they ask a follow up
    question. Creating a new posting does not allow for
    continuity of the problem. New people reading this
    posting don't know what has already been suggested.
    Maybe myself or someone else will explain it better.
    I also asked you to:
    a) post a "small" example showing your problem. 200
    lines of code is not small.
    b) use the code tags when posting code. You couldn't
    even manage to do that.
    Have you read the code from the Swing tutorial on
    [url
    http://java.sun.com/docs/books/tutorial/uiswing/compon
    ents/layeredpane.html]Using Layered Panes for
    an example of this type of behaviour?
    A bit off topic but I have to say I truly admire your patience.

  • Positioning HorizontalBar in JScrollPane and scroller

    Hi,
    I have attached a JScrollPane to a text area.
    the code is as follows.
    JScrollPane jsp = new JScrollPane( jtx1 );
    however since the contents in the JTextArea is large horizontally, the text gets displayed in the textarea. However the scroller in the JScrollPane gets positioned towards the end of the text. How do I specify to make sure that the Scroller is always in the start of the text?
    and also i wanted the Vertical ScrollBar to be always visble and what i did was:
    int vpolicy = jsp.getVerticalScrollBarPolicy();
    jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    The Vertical ScrollBar gets displayed. However I am not ablt to see the scroller in the JScrollPane's vertical bar as I don't have sufficient text vertically. How do i specify that the scroller always be present in my vertical side...irrespective of the contents in the Textarea. i.e i always want to scroll. (I see the ScrollBAr. however am not able to scroll b'coz i have less text.)
    Thanks!
    Karthik.

    Hi,
    I have attached a JScrollPane to a text area.
    the code is as follows.
    JScrollPane jsp = new JScrollPane( jtx1 );
    however since the contents in the JTextArea is large horizontally, the text gets displayed in the textarea. However the scroller in the JScrollPane gets positioned towards the end of the text. How do I specify to make sure that the Scroller is always in the start of the text?
    and also i wanted the Vertical ScrollBar to be always visble and what i did was:
    int vpolicy = jsp.getVerticalScrollBarPolicy();
    jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    The Vertical ScrollBar gets displayed. However I am not ablt to see the scroller in the JScrollPane's vertical bar as I don't have sufficient text vertically. How do i specify that the scroller always be present in my vertical side...irrespective of the contents in the Textarea. i.e i always want to scroll. (I see the ScrollBAr. however am not able to scroll b'coz i have less text.)
    Thanks!
    Karthik.

  • Problem in setting desired position for JPanel in JScrollPane!!!

    Dear Friends,
    I am having problem to set desired Scrollable(JScrollPane) JPanel position. I have a JPanel in a JFrame which is scrolable with lot of objects. It automatically displays on the top position inside JScrollPane, I want to set scroll position on the middle for the panel.
    I went through the search for the same in this forum, i found some posts related to this but they are linked with JTextArea(setCaretPosition). With JPanel i can't set caret position.
    Could anyone guide me how to set the scroll position on middle.
    Regards..
    Jayshree

    Replace:
    if(view.getValueAt(row,column) instanceof ImageIcon){
            ((Component)view.getColumnModel().getColumn(column).getCellRenderer().
            getTableCellRendererComponent(view,view.getValueAt(row,column),true,true,row,column)).setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
            ((Component)view.getColumnModel().getColumn(column).getCellRenderer().
            getTableCellRendererComponent(view,view.getValueAt(row,column),true,true,row,column)).setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
          }with:
    if(view.getValueAt(row,column) instanceof ImageIcon)
            view.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
           view.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

  • Back button in Photoshop's CS4 and CS5 Save as dialog is grayed

    Whenever I open several photos and save them after job is done I have to manually locate save folder. Photoshop always opens default folder where picture is originally located, and doesn't offer back button where I saved last photo.
    This is very frustrating, because when I open several photos from different locations I want to save them on same new location. Back button is always greyed, and recent places often doesn't serve the purpose because sometimes all subdirectories have the same filename-PHOTOS, so in recent places I have 5 places with same name.
    I have this problem since CS4. This was major problem for me and I sticked to CS3. I thought it was 10.5.x problem. Later I upgraded to CS5, but problem remained. I uninstall it, upgrade to 10.6.3 SL, and reinstall CS5 but still no changes. I would really like to uninstal CS3, but cant afford to loose this functionality.
    Anyone had the same problem? I tried to google it, but couldn't find anything.
    Thnx
    My specs (but probably doesn't matter)
    Imac 2.8 Core 2 duo
    4Gb RAM
    10.6.3 SL
    CS5 extended, v 12.0

    Thanks, almost perfect!
    Well basically it does change things, but this is still not functionality as in CS3. Back button is still gray, and save as opens last save position. It does help, because I don't have to scrub trough recent places, but in CS3 I could go back as far as I want. Like in web browsing, back is meant to be for getting back. Back, back, back. In fact, only time I can press back button is when I am browsing trough folders searching for new save position. When I press save, back is always gray and totally useless. Is like this to everyone? Did maybe Adobe loose that functionality?
    I tried now to compare functionality from both, and CS3 even remembers position from last photo I saved minutes ago in CS5?!
    My English is not so good, so I hope I am explaining clearly enough.

  • HELP: How can I save page state on UIX page...

    I have a fallowing situation:
    1. I create UIX application with Wizard based on one ViewObject
    2. When I get a page with ViewObject in table style I travers up and down through records and make some updates and create new records
    3. But when I go back from update and create pages I always get initial browesing page.
    My question is: how can I save state of browsing page when I return to it from update and create or any other page (save position look hide/show mode or anything else)?
    I try to use StateManager class but I faild.
    Can anybody help me or describe how can I do it on one example?
    Thanks!

    Attila,
    Sounds as though you want to remember the interactive state of your pages across requests.
    That means you'll need to store the interactive state of your pages in something like the HttpSession that has a lifecycle spanning across multiple requests.
    If you make your pages interactive using the HttpSession, then, when you navigate back from another page, they should still be in the state you left them.
    The built-in data provider name for the HttpSession in uiXML is ctrl:httpSession. Use this to data bind the interactive attributes of your page, such as the disclosed attribute of HideShow.
    In your event handlers, update the HttpSession to make your page interactive.
    Be careful to use different keys to store information in the HttpSession for different pages.

  • Position name in two language

    Dear All,
    As per my client requirement, position text (Infotype 1000) should be save in a two language, English and Russian with a same validity ,i tried to copy infotype 1000 for the position,and rename object in Russian language,but in this case other record (English Language) is being deleted,i know it can be done through changing time constraint for IT1000,but is it right approach?or is there any way by this we can save position name in two language with same validity.
    Thanks in Advance.
    Priyanka

    hello,
    in PP01 select you position, and Infotype 1000 Object, click the button Edit, change the language field, and save it... this will create a new translation .
    to make sure, display again the Infotype object, Goto Display translation
    regards
    Hadrien

Maybe you are looking for