JTable - row focus color

I wrote a program which will change the color of each row.
odd row background color will be white
even row background color will be gray.
My doubt is?
if i move the mouse on the any row, that row should have a different background color (dark of row background)

I tried with DefaultTableCellRenderer, but it is not
workingIs this what you want?
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
public class RowColor extends JFrame {
    public RowColor() {
        Object[][] data =
            {"Row 1", "Row 1"},
            {"Row 2", "Row 2"},
            {"Row 3", "Row 3"},
            {"Row 4", "Row 4"}
        Object[] columnNames = {"Column 1","Column 2"};
        JTable table = new JTable(data, columnNames) {
            public TableCellRenderer getCellRenderer(int row, int column){
                DefaultTableCellRenderer c = (DefaultTableCellRenderer)super.getCellRenderer(row, column);
                if (row % 2 == 0)
                    c.setBackground(Color.GREEN);
                else
                    c.setBackground(Color.YELLOW);
                return c;
        JScrollPane scrollPane = new JScrollPane( table );
        getContentPane().add( scrollPane );
    public static void main(String[] args) {
        RowColor frame = new RowColor();
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
}

Similar Messages

  • How to set JTable row background color

    Hello,
    I have seen JTable with rows having alternate background color (mostly white and light blue). How can i set the same.
    Thanks,
    Deepak

    Well, i am new user to forum and so have no idea if this question has been asked previously "countless" times.Which is why you "search first" and "ask later". How to you expect to find out what valuable information is in the forum without learning how to do a simple search. This goes for any forum on the web you might use, so don't use the "I'm a new user" excuse.

  • Change Row Backgroud color in Jtable : ADF Swings

    Hi ,
    I have developed a ADF Swings Details Form . On Details FORM LOAD if Check Box is TRUE( means selected) i have to change the back ground color of the JTable row and also i have make that row as READ ONLY mode .
    Need help.
    Regards
    Bhanu Prakash

    ok i found how to do it
    i directly inserted this in the renderer code:
    if (row == table.getSelectedRow() && column == table.getSelectedColumn())
    cell.setBackground(etc);
    (curiously it does not work with "if (isSelected)")
    thanks :)

  • Getting ClassCastException When Trying To Color JTable Row?

    hi there
    i'm trying to set color for JTable Rows Using the method prepareRenderer
    and get the values of the second column which contains integer values
    and if it contain 0 integer value set the color row as red
    its already works and the row with 0 is set to red but when i try to select any cell in the table
    i'm getting
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integerat prepareRenderer
    although the second row which i'm trying to test it's values is Integer not String????????????
    here's the code:
    import javax.swing.border.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.JFrame;
    public class Column_Filter {
      static JTable table;
    static DefaultTableModel dtm;  
        public static void main(String[] args) {
             String[]columns={"Name","Number","Price"};
             Object[][]data={  {"a",new Integer(5),new Integer(200)}
             ,{"b",new Integer(7),new Integer(400)}
             ,{"c",new Integer(0),new Integer(100)}
             ,{"d",new Integer(8),new Integer(800)}
             ,{"e",new Integer(3),new Integer(300)}         
             dtm=new DefaultTableModel(data,columns);
                        table=new JTable(dtm){
                      public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
                             public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                        Component c = super.prepareRenderer(renderer, row, column);
                        if (!c.getBackground().equals(getSelectionBackground()))
                             Integer type = (Integer)getModel().getValueAt(row, 1);
                             if(type!=null)                                                            
                             c.setBackground(type==0 ? Color.RED : Color.WHITE );
                        else
                        c.setBackground(Color.white);
                        return c;
             TableColumnModel columnModel = table.getColumnModel();
             TableColumn col1 = columnModel.getColumn(1);         
             col1.setCellEditor(new TableEditor());
             TableColumn col2 = columnModel.getColumn(2);
             col2.setCellEditor(new TableEditor());
             table.setPreferredScrollableViewportSize(new Dimension(280,160));
             JScrollPane scroll=new JScrollPane(table);
             JLabel label=new JLabel("Column Stuff",JLabel.CENTER);
             JPanel panel=new JPanel();
             panel.add(scroll);
            JFrame frame=new JFrame("Column Stuff");
            frame.add(label,BorderLayout.NORTH);
            frame.add(panel,BorderLayout.CENTER);
            frame.setSize(300,300);
            frame.setResizable(false);
            frame.setVisible(true);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 table=new JTable();     
                   table.setModel(new DefaultTableModel(new Object [][][] {},new String [] {"Name", "Number","Price"}) {
                Class[] types = new Class [] {
                    java.lang.String.class, java.lang.String.class,java.lang.String.class
                public Class getColumnClass(int columnIndex) {
                    return types [columnIndex];
          class TableEditor extends DefaultCellEditor
              TableEditor()
                   super( new JTextField() );               
                setClickCountToStart(0);
              public boolean stopCellEditing()
                        String editingValue = (String)getCellEditorValue();
                    if(!editingValue.equals("")){
                 try
                int i = Integer.parseInt(editingValue);
                catch(NumberFormatException nfe)
                ((JComponent)getComponent()).setBorder(new LineBorder(Color.red));       
                getComponent().requestFocusInWindow();      
                JOptionPane.showMessageDialog(null,"Data Input Error","Error",JOptionPane.ERROR_MESSAGE);
                return false;          
                    else{                                             
                     getComponent().requestFocusInWindow();
                     fireEditingCanceled();
                     JOptionPane.showMessageDialog(null,"Data Input Error","Error",JOptionPane.ERROR_MESSAGE);
                  return false;              
                   return super.stopCellEditing();
                   public Component getTableCellEditorComponent(
                   JTable table, Object value, boolean isSelected, int row, int column)
                   Component c = super.getTableCellEditorComponent(table, value, isSelected, row, column);
                   ((JComponent)c).setBorder(new LineBorder(Color.BLACK));
                   return c;
         }

    hi again camickr
    i changed the stopCellEditing as you mentioned
    changed the getCellEditorValue to return an integer
    and give exception and error message if the value can't be converted into integer(non numeric)
    but the problem is when i run the program and change the value in any cell with numeric values
    or with non numeric or not changing the value and press enter
    it give the error message meaning it cannot convert the value to integer
    even if enter an int or don't change the value ????????
    here's what i did
    import javax.swing.border.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.JFrame;
    public class Column_Filter {
      static JTable table;
    static DefaultTableModel dtm;  
        public static void main(String[] args) {
             String[]columns={"Name","Number","Price"};
             Object[][]data={  {"a",new Integer(5),new Integer(200)}
             ,{"b",new Integer(7),new Integer(400)}
             ,{"c",new Integer(0),new Integer(100)}
             ,{"d",new Integer(8),new Integer(800)}
             ,{"e",new Integer(3),new Integer(300)}         
             dtm=new DefaultTableModel(data,columns);
                        table=new JTable(dtm){
                      public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
                             public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                        Component c = super.prepareRenderer(renderer, row, column);
                        if (!c.getBackground().equals(getSelectionBackground()))
                             Integer type = (Integer)getModel().getValueAt(row, 1);                                                            
                             c.setBackground(type==0 ? Color.RED : Color.WHITE );
                        return c;
             TableColumnModel columnModel = table.getColumnModel();
             TableColumn col1 = columnModel.getColumn(1);         
             col1.setCellEditor(new TableEditor());
             TableColumn col2 = columnModel.getColumn(2);
             col2.setCellEditor(new TableEditor());
             table.setPreferredScrollableViewportSize(new Dimension(280,160));
             JScrollPane scroll=new JScrollPane(table);
             JLabel label=new JLabel("Column Stuff",JLabel.CENTER);
             JPanel panel=new JPanel();
             panel.add(scroll);
            JFrame frame=new JFrame("Column Stuff");
            frame.add(label,BorderLayout.NORTH);
            frame.add(panel,BorderLayout.CENTER);
            frame.setSize(300,300);
            frame.setResizable(false);
            frame.setVisible(true);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 table=new JTable();     
                   table.setModel(new DefaultTableModel(new Object [][][] {},new String [] {"Name", "Number","Price"}) {
                Class[] types = new Class [] {
                    java.lang.String.class, java.lang.Integer.class,java.lang.Integer.class
                public Class getColumnClass(int columnIndex) {
                    return types [columnIndex];
          class TableEditor extends DefaultCellEditor
              TableEditor()
                   super( new JTextField() );               
                setClickCountToStart(0);
              public boolean stopCellEditing()
                   try
                        Integer editingValue = (Integer)getCellEditorValue();
                   catch(ClassCastException exception)
               //when i enter any value in any cell this code is executed even i enter an int or don't change the value
                ((JComponent)getComponent()).setBorder(new LineBorder(Color.red));       
                getComponent().requestFocusInWindow();      
                JOptionPane.showMessageDialog(null,"Data Input Error","Error",JOptionPane.ERROR_MESSAGE);
                return false;
                   return super.stopCellEditing();
                   public Component getTableCellEditorComponent(
                   JTable table, Object value, boolean isSelected, int row, int column)
                   Component c = super.getTableCellEditorComponent(table, value, isSelected, row, column);
                   ((JComponent)c).setBorder(new LineBorder(Color.BLACK));
                   return c;
         }

  • Changing JTable Row Color OnMouseOver

    Hello everybody,
    is it possible to change JTable Row Color when Mouse passes over it ??
    THanks!

    Yes...
    You have to override the table cell renderer and set the color of the rows based on flag.
    The flag can be turned on/off in a mouse motion listener of the table.

  • Is it possible to give an added row a Color.

    Hello I read data of a txtfile and than place the data in a jtable.
    I know how to give a selected row an other color but my question is:
    Is it possible to give an added row a Color.
    I make the new row this way
    moddellist.addRow(new Object[]{data,""});
    Now I want this added row red is this possible.
    I don't know what the rowIndex or Cell number is.

    The colour of a cell in a JTable is assigned by a TableCellRenderer. If you look at how that works, all it knows is the object in the cell, the table, the row and column number, and whether the cell is selected or focussed. It doesn't care when things happened.
    So if you want your TableCellRenderer to colour your cells based on something that isn't in that list, then you have to modify the design of your object, the one in the cell, so that it contains information the cell renderer can use to decide what colour to render it.
    Based on your description I can't say much more than that, because it's hardly a complete description of how the colour scheme is supposed to work.
    And by the way the people in the Swing forum are better at answering Swing questions.

  • JTable Cell Focus Problem

    I am using the setValueAt method in the TableModel of a JTable in order to do validation of the value the user has entered into a cell of a table (the validation involves looking at the values of other components on the same JFrame).
    Everything works fine, except for the following case: The person enters a value into the cell of the editor. The person then moves the focus to another component via a mouse-click. The cell in the table still shows the new value entered by the person, but the setValueAt method is never triggered, and <table>.getValueAt(<row>,<col>) shows the value of the cell prior to the change.
    Is there a way to ensure the setValueAt method of the TableModel is triggered before the JTable loses focus? Or is there a better (i.e. correct) way to accomplish this (ensuring a cell change is 'committed' to the table before
    losing focus)?

    Bug? What Bug? Sun considers this a feature....LOL
    Here is my work-around:
       public boolean editCellAt(final int row, final int col, EventObject e) {
          if (e instanceof MouseEvent) {
             if (((MouseEvent)e).getClickCount()<2) {               // single click on a cell other than the one being edited causes editing to stop
                if (isEditing())getCellEditor(getEditingRow(),getEditingColumn()).stopCellEditing();
                return false;
          return super.editCellAt(row,col,e);                         // cell editing on a keyevent or a double mouse click
       }This is will if the mouse is clicked elsewhere on the same table. I have a lot of other tricks for JTable and things....check out my web site at:
    http://www.aokabc.com
    ;o)
    V.V.

  • Add JTable Row Headers At The End Of The Rows(At Right)?

    hi all
    i got this example for adding JTable Row Headers,but it adds the headers at the left(beginning of the row)
    and i want to add the headers at the end of the row(at right),any ideas how to do that?
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.AbstractListModel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListCellRenderer;
    import javax.swing.ListModel;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    * @version 1.0 11/09/98
    class RowHeaderRenderer extends JLabel implements ListCellRenderer {
      RowHeaderRenderer(JTable table) {
        JTableHeader header = table.getTableHeader();
        setOpaque(true);
        setBorder(UIManager.getBorder("TableHeader.cellBorder"));
        setHorizontalAlignment(CENTER);
        setForeground(header.getForeground());
        setBackground(header.getBackground());
        setFont(header.getFont());
      public Component getListCellRendererComponent(JList list, Object value,
          int index, boolean isSelected, boolean cellHasFocus) {
        setText((value == null) ? "" : value.toString());
        return this;
    class RowHeaderExample extends JFrame {
      public RowHeaderExample() {
        super("Row Header Example");
        setSize(370, 150);
        ListModel lm = new AbstractListModel() {
          String headers[] = { "Row1", "Row2", "Row3", "Row4"};
          public int getSize() {
            return headers.length;
          public Object getElementAt(int index) {
            return headers[index];
        DefaultTableModel dm = new DefaultTableModel(lm.getSize(), 4);
        JTable table = new JTable(dm);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setRowHeight(18);
        JList rowHeader = new JList(lm);
        rowHeader.setFixedCellWidth(50);
        rowHeader.setFixedCellHeight(18);
        rowHeader.setCellRenderer(new RowHeaderRenderer(table));
        JScrollPane scroll = new JScrollPane(table);
        scroll.setRowHeaderView(rowHeader);
        getContentPane().add(scroll, BorderLayout.CENTER);
      public static void main(String[] args) {
        RowHeaderExample frame = new RowHeaderExample();
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
        frame.setVisible(true);
    }

    fixed by:
    list.setBackground(table.getTableHeader().getBackground());here's the full code:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.ComponentOrientation;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.DefaultListModel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListCellRenderer;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    * @version 1.0 11/09/98
    class RowHeaderRenderer extends JLabel implements ListCellRenderer {
      JTable table;
      RowHeaderRenderer(JTable table) {
        this.table = table;
        JTableHeader header = table.getTableHeader();
        setOpaque(true);
        setBorder(UIManager.getBorder("TableHeader.cellBorder"));
        setHorizontalAlignment(CENTER);
        setForeground(header.getForeground());
        setBackground(header.getBackground());
        setFont(header.getFont());
      public Component getListCellRendererComponent(JList list, Object value,
          int index, boolean isSelected, boolean cellHasFocus) {
        list.setBackground(table.getTableHeader().getBackground());
        setText((value == null) ? "" : value.toString());
        return this;
    class RowHeaderExample extends JFrame {
      public RowHeaderExample() {
        super("Row Header Example");
        setSize(370, 150);
        setLocationRelativeTo(null);
        DefaultListModel lstModel = new DefaultListModel();
        lstModel.addElement("Row 1");
        lstModel.addElement("Row 2");
        lstModel.addElement("Row 3");
        lstModel.addElement("Row 4");
        DefaultTableModel dm = new DefaultTableModel(lstModel.getSize(), 4);
        JTable table = new JTable(dm);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setRowHeight(18);
        JList rowHeader = new JList(lstModel);
        rowHeader.setFixedCellWidth(50);
        rowHeader.setFixedCellHeight(18);
        rowHeader.setCellRenderer(new RowHeaderRenderer(table));
        JScrollPane scroll = new JScrollPane(table);
        scroll.setRowHeaderView(rowHeader);
        table.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        scroll.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        getContentPane().add(scroll, BorderLayout.CENTER);
      public static void main(String[] args) {
        RowHeaderExample frame = new RowHeaderExample();
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
        frame.setVisible(true);
    }

  • Change row's color in report painter

    Hi all!!!
    anybody knows how change row's color in report painter,
    for example
    number   name        |  money          
       7020   payments1 | 100.00   
       7021   payments2 | 200.00
        summary            |  300.00
    change color of row  "7020   payments1" and "7020   payments1"
    Regards!!!

    Hi,
    For it, first place the cursor on the row and choose Formatting > Row. In the next dialog box, select a color (for totals, subtotals, inserted rows, or for emphasis). The system assigns a color based on the selection you make here.
    Regards,
    SDNer

  • WorkOrderList TileView Row & Selected Row Background Color Change

    Hi,
         can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
    but these applied style on Rows & Selected Rows are not working in Agentry client.
    if any other alternate solution exist in Agentry, please guide me.
    i am using following...
      sap mobile platform-2.3.3
    Thanks & Regard
    Manish Kumar
    Tags edited by: Michael Appleby

    Hi Jason
          Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
         Please guide me how to remove white outline and default Blue Selected Background color.
    Thanks & Regard
    Manish Kumar

  • Displaying Alternate row as colored in Cross tab

    Hi,
    I have a report where I need to display alternate rows as colored.
    There is some data in detail section followed by a cross tab in the report header section.
    While I am able to display alternate rows as colored in Detail secction for displaying alternate colored rows in Cross tab data I need some help.
    Data in cross tab is like this
                  history geography
    Tammy   90          60
    Sid         80          50
    Julia       70        40
    In cross tab for displaying alternate colored rows ie for alternate student names  I am using two formulas
    - for displaying row values I am using this one
    whileprintingrecords;
    numbervar d;
    d := iif(d=100,255,100);
    color(255,255,d);
    For displaying alternate colored inner cells ie marks  I am using this formula
    whileprintingrecords;
    numbervar c;
    c := iif(c =255,100,255);
    color(255,255,c)
    I got these formulas after doing Googling
    My cross tab is present in report footer and in the generated report it comes separeated in two pages.
    In the first page data for Tammy and Sid is displayed while Julia is displayed on next page.
    Now the Tammy is coming as yellow colored and as expected Sid is coming as white colored. However Julia which is on next page is coming as white , but logically it should have come as yellow. On the other hand my column data ie marks column is coming fine. Data for tammy and sid is coming as alternately colored and data is Julia on the next page is coming as yellow(as data for Sid is in white)
    I am not able to understand why this is happening and what is the correct way to do alternate row coloring in cross tabs
    Edited by: thunderball10 on Aug 26, 2010 11:57 AM
    Edited by: thunderball10 on Aug 26, 2010 12:00 PM

    Where is your variable c being reset.
    If in page header or group header and you have repaet group header on new page then c will be reset on each page.
    If In groupheader try adding this to reset formula
    if not inrepeatedgroupheader then
    Ian

  • Grouping and UnGrouping of JTable Rows?

    Hi,
    Has somebody done Grouping and UnGrouping of JTable Rows as we find in MS-Excel.
    Thanks & regards
    blue

    Hi,
    Have anyone done something like this.
    If u r not clear about the requirement:
    Please see the screenshot uploaded at below url:
    [http://www.geocities.com/coolneela/GroupableTable.JPG]
    As shown the screenshot i want the Group 1 ,2,3 to be expandable and hideable i.e should behave like a Jtree node.....In rest of the column User can enter any input i.e for the columns A,B,C..
    thanks & regards
    Neel

  • Sort jTable rows by column as Integer value

    Hi all,
    I have problem with sort jTable rows. I have some columns and in first are integer data. jTable sort that as String value..1,10,11,12....2,21, ...
    How can I do that?
    Thanks

    In the future, please post Swing questions to the Swing forum: http://forum.java.sun.com/forum.jspa?forumID=57
    What does the TableModel's getColumnClass method return for that column?

  • AdvancedDataGrid Row background color

    Hope someone can help, I wish to highlight an entire row or rows that match a value. I assumed the stylefunction would get me there but I have not found the style refering to the row background color.
    Any help please.
    Thank You

    The solution I found was to extend the data grid class, add override to the draw background and add a rowcolorfunction. When using item renderers you must use the style function with the alternatingItemColors so the renderer gets the color correct and not opaque.
    Thanks looking saisri2k2.

  • Row background color in dataTable control based on criteria

    It is relatively straightforward to give a pattern of color to rows in a dataTable control, for instance to alternate colors from white to gray.
    However, I have not yet figured how the row background color could be decided based on data fields associated with each row. For instance, I would like to set the row background color based on the value of a boolean attribute associated with the row, e.g. white if value is false and gray if it is true.
    Is there an easy way to do this?
    Martin

    of the text, but not the whole cell. I need to find a
    way to change the span at the row level (on the <tr>
    tag). ANy ways to do this?
    MartinThis is a question of how to let the renderer adjust its behaviour depending on the current state of the model. My renderer changes the background for the selected row by changing the style class:
            writer.startElement("tr", table);
              if (table.getRowSelector())
                   if (table.isAtSelectedRow())
                        writer.writeAttribute("class", "selectedRow", null);
    etc.(of course, to be able to do this you must write your own renderer)
    erik

Maybe you are looking for

  • Pricing of Service Entry Sheet is not coming in editable mode in ML81N

    Dear Friend, I am trying to create a Service Entry Sheet in ML81N where selecting the red button for Condition where itu2019s all coming in display mode where as I have maintained some Z Condition to put the value or % wise. Client requirement is put

  • Exiting LDB in custom program but contiue with further execution....

    Hello Gurus, I have a program attributed a logical database 'VAV'. I have a parameter after the logical selection field for maxium transaction hits. If the logical database selection exceeds the maximum hits , then I want the logical database selecti

  • Mixing Resolutions

    Does the latest version of Final Cut Pro HD or Studio support mixing clips and materials of different resolutions (i.e. DV25 411, HD 1080i, HDV1080i and 720) into one sequence or timeline? Would it be able to playback the edit seamlessly? Can it also

  • X-Apps certification

    Hi all, What are the pre requisites for getting x-apps certification for a business package? Regards Rohit

  • Itunes displays the error message

    Hi All, I installed latest iTunes from apple. I can play the songs on the list (imported from CD). When I plug-in the IPod shuffle I get the following error message: The software required for communicating with the Ipod installed correctly. Please re