Automatically Add Album Artwork when adding new music

Does anyone know how you can have iTunes automatically discover the album artwork, if you already have it?
I am backing up CDs and music which I already have converted to some digital format, and trying to compile all my music together from my wife and myself in a central location.
Many of the artist music folders already have an artwork image there associated with it.
So when adding a folder, is there a way to have iTunes automatically "see" that album cover? Would it be a convention for naming the file? Or a file size/picture size thing? Or place it in a specific location when importing?
Yes, I do know you can manually do it, which is fine for an album or two. But our collective media libraries are a mess, and there are hundreds of albums to import.
Also, I know you can use iTunes to "Search for missing album art work" but I also know that process is flawed, does not always turn up the correct art, and also does not code the artwork along with the track, so if you move music later on, the whole process starts over again.
I would imagine there has to be a way to kick iTunes to recognize the associated artwork automatically upon import. Any suggestions?
(ps - i use Windows XP Pro, iPhone 3G 16GB, iTunes 9.0.3.15)

ed2345 wrote:
Smart Playlists allow you to add tracks from the library to the playlists, according to rules. If the track is not in the library, Smart Playlists will not do anything with it. They do not help iTunes to notice that new files have been added to folders.
If it's not in the library, iTunes won't play it...
If you're adding music to iTunes, use the Add to Library function. That's what it's there for. iTunes will be happy that way and if you have smart playlists set up, they will be filled with the new additions.
Tracy

Similar Messages

  • ITunes now becomes non-responsive when adding new music

    Hello.
    For a few months now iTunes has gone from quick importing of new mp3 and m4a files from my desktop, down to very slow importing after a long pinwheel, and now finally the endless pinwheel whenever I add any files. (It can go on hours, and requires force quit).  My collection is large (50k files / 1TB or so), and the media sits on an external hard drive, but I have tried creating a new library from scratch on the desktop (and internal hard drive) and I still get the same endless pinwheel when adding just a few new files.  The only other clue I have is that when the importing slowness just started, a third party metatagging application I use (TuneUp) was not recognizing the newly imported files as having been imported by iTunes, whereas I did use iTunes to import.
    I am loathe to create a new library altogether as I've done much editing within iTunes to my large collection.  (See this article: iTunes: How to re-create your iTunes library and playlists - Apple Support)
    I am using latest Yosemite version (10.10.2) on a 2011 Mac Mini with a recent SSD inside (iTunes worked fine after the SSD upgrade a year ago).
    Thanks for any help!

    Start by removing "TuneUp." See whether there's an improvement.
    Any third-party software that doesn't install by drag-and-drop into the Applications folder, and uninstall by drag-and-drop to the Trash, is a system modification.
    Whenever you remove system modifications, they must be removed completely, and the only way to do that is to use the uninstallation tool, if any, provided by the developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job.
    I never install system modifications myself, and except as stated in this comment, I don't know how to uninstall them. You'll have to do your own research to find that information.
    Here are some general guidelines to get you started. Suppose you want to remove something called “BrickMyMac” (a hypothetical example.) First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickmymac.com. (That may not be the actual name of the site; if necessary, search the Web for the product name.) If you don’t find anything on the website or in your search, contact the developer. While you're waiting for a response, download BrickMyMac.dmg and open it. There may be an application in there such as “Uninstall BrickMyMac.” If not, open “BrickMyMac.pkg” and look for an Uninstall button. The uninstaller might also be accessed by clicking the Customize button, if there is one.
    Back up all data before making any changes.
    You will generally have to restart the computer in order to complete an uninstallation. Until you do that, there may be no effect, or unpredictable effects.
    If you can’t remove software in any other way, you’ll have to erase and install OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    Trying to remove complex system modifications by hunting for files by name often will not work and may make the problem worse. The same goes for "utilities" such as "AppCleaner" and the like that purport to remove software.

  • I have a Ipod touch and recently added new music to my itunes library on my laptop. When I sync with my ipod, the new music does not show up on my ipod even though the sync process seems to be working.

    I have an Ipod touch and recently added new music to my Itunes library. When I sync with the library, the new music does not show up on my ipod. The sync process seems to be working and there is still plenty of space on the Ipod for new music so I'm not sure what the problem is!

    What happens when you try to sync?
    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    Do the songs play in iTunes?
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod        
    Do you have any Restrictions (Settings>General>Restrictions) set that would prevent syncing those songs?

  • Why can't i add album artwork to most of my music?

    seems like itunes will only let me add album art of mp3's, not my main music library. am i doing something wrong?

    It's mostly wav files.
    why does it not let us add album artwork to wav files? i like keeping my library as wav files instead of compressing my music.

  • ITunes 7- Can't add album artwork

    Lotta dsicussion about this topic, but I haven't seen my particular problem come up. When I try to manually add album artwork nothing happens. I've seen other people say they couldn't get it to work when they just dragged the artwork, but I can't get it to work when I crt+click and get info either. When I get info and paste the artwork into the box, the image shows up, but when I click okay, nothin happens. I make sure the checkbox beside the artwork is checked before I hit Okay.
    Apple's automatic get album artwork worked pretty well, but only found about 80% of my albums. Pretty good considering the weird crap I listen to, but I'm pretty anal, and if 80% is gonna have artwork I want the rest to also.
    Would the problem be that my library is on an external HD?
    Is the problem that my computer (G3 ibook, 640MB SDRAM, OSX 10.4.7) is getting on in years? I can't think of any other ways to tell it to get the artwork, any help would be much appreciated!!

    For files that won't let you change their artwork, there are two primary things you can check.
    Firstly, make sure that the file is writable. If it is on a volume where permissions are managed, make sure you can write to both the file and the folder it is contained in. Select the file in iTunes, command-R, then use Get Info in the Finder to set the file/folder write access if necessary.
    Next make sure the Creator and Type of the file isn't set to an iTunes unfriendly type. I know this was an issue in previous versions of iTunes. For example, for an mp3 file Creator=hook Type=MPG3. I know this sounds like stupid advice, setting resource fork information when Apple is telling us to stay away from using resource forks in OS X. iTunes apparently hasn't heard the news.
    Perhaps adding album artwork to a file on an external volume is acting like the funny behavior of adding artwork to files on iPods. You apparently can't do it directly, but instead have to stage the artwork adding action on the volume which contains your iTunes Music folder, place the files in a temporary LIBRARY based playlist in iTunes, then drag copy the files from this playlist into the target iPod DEVICES playlist.
    It is no longer clear to me what actions constitute an embed artwork action (place associated artwork inside the ID3 tag area of the file itself) versus an attach artwork action (place associated artwork in a separate artwork folder). This is extremely confusing stuff for an application that begins with a lower case i.

  • Get Info does not allow me to manually add album artwork

    Hello,
    I am trying to manually upload album artwork on iTunes with my Windows PC (Windows 8.1 64 bit).  I followed all of the steps for doing this as outlined here in the Help section.  I did a Google search, found the album artwork in JPEG format on the internet, and then saved it to a folder on my hard drive. I then went back into iTunes, right clicked on the album that is missing its artwork, and clicked the "Get info" button.  When the next screen opens I select the "Artwork" tab, and then I select the "Add Artwork button."  This opens up a browser for my file directory, and then I went to the folder where I  saved the album artwork and double clicked on the particular JPEG I wanted to add for the CD.  The JPEG was immediately loaded onto the screen, and everything looked good to go. However, when I hit the "OK" button to select this uploaded album artwork which is loaded on the screen, for whatever reason iTunes does not save it, and the album artwork icon for the CD remains blank. Let me know where I am going wrong, or if this is a bug that needs to be addressed.
    Also, I have a program called Music Collectorz that I am using to catalog all of my CDs as I burn my collection to iTunes.  For those CDs in which the Collectorz program cannot automatically find or identify the appropriate album artwork on its own, I can open up the Collectorz program's own version of "Get Info" and select "Find Cover Art."  By doing this, the Collectorz program automatically does a search on the internet--without me having to leave the Collectorz program--and retrieves several "hits" it located for the missing artworkwhich it displays on another window within the program. I then simply double click with the mouse on the photo of the artwork file I want to upload to associate with the particular CD, and it is automatically uploaded and associated with the CD. Also, the Collectorz program will only allow you to upload artwork that is saved in file formats and sizes that are supported by the program like JPEG files. 
    It seems to me that Apple should have an easy way like this to manually add album artwork in iTunes. I should not have to do a separate Google search outside of the iTunes program, then save a JPEG to my hard-drive in another folder, and then go back into iTunes to add (or try to add) it to a CD's profile.  This is a waste of time, and involves several unnecessary steps.  This process should all be incorporated through the iTunes program as a one-stop shop method.  I should never have to leave the iTunes program to add any artwork ever.
    I look forward to your response on this.
    Thanks,

    I assume that there are legal restrictions on the way in which iTunes can get artwork automatically from any source apart from the iTunes Store (which is what the right-click > Get Album Artwork function uses).  For example, even though the Gracenote service that iTunes uses to match CDs and retrieve metadata (artist, album, track titles, etc.) also has artwork functions, iTunes does not make use of these.
    For manual addition of artwork, there are three cases where the image you select may not be correctly embedded in your media files:
    your media are in a format that doesn't accommodate embedded artwork - typically WAV files.  To embed artwork you'll need to convert to another format - Apple Lossless or AIFF if you want to preserve lossless quality, AAC or MP3 otherwise.
    your media files are read only - to fix this, use Windows Explorer to find the folder that contains your files, right-click and select Properties.  On the General tab there's a check box labeled "Read-only" - if this is checked, or is grey (sometimes blue), click the box so that the flag is unchecked and the box is white.  Click OK, and then OK again when the "Apply changes to this folder, subfolders and files" option selected.  Now try adding the artwork again.
    Windows permissions issues are preventing iTunes from updating your media files (there's some anecdotal evidence of a change in this behavior in iTunes 12).  See turingtest2's notes on Repair security permissions for iTunes for Windows for advice on fixing this, then try adding the artwork again.

  • Any fix for random art and song order problems after adding new music?

    If I sync my touch with itunes as a restore, all cover art, albums and playlists are correct. Once I add anything new or make a change and re-sync, random cover art is missing and random songs are in the wrong order. The only way to fix the problems is through a complete restore. Has anyone else had this problem or figured out a fix? I am using the latest itunes on a PC with XP.

    A few issues, but sorry let me try to understand.
    Adding new music, 'XXXX's iPod cannot be written or read'' can you let me know the number. most likely music format is not iPod Compatible like HE-AAC.
    started skipping songs  - these are normally due to corrupted ID3 tags, try converting them -File-> Advance -> IPOD version or use MP3 validator to fix all songs in the library. (My Apologies, only work for MP3 music that skipped)
    As for item 2, you can try Hard Reset if you like to download MP3 validator.
    After charging till full charge, at least 2 hours (preferably 4 hours)
    Toggle the Hold switch, make sure you dont see the red mark when you do the  next step
    Reset the iPod -> Press Menu and Center button simultaneously for about 10 secs till the Apple Logo comes ON
    Then release the buttons
    Select your preferred language.
    Here is the Apple support Article on the 5Rs
    http://www.apple.com/support/ipod/five_rs/classic/
    Good Luck!

  • Get info add album artwork

    I happen to have quite a few songs that iTunes won't automatically add the artwork for so I have to add it myself. When I go into 'Get Info' and then choose add artwork, the artwork only works for that session. If I were to take the song out of iTunes and then put back in iTunes, the artwork is missing again. Essentially it's not saving the artwork like iTunes used to.
    Has anybody else had any issues with this and who possibly knows a way to work around it.

    I assume that there are legal restrictions on the way in which iTunes can get artwork automatically from any source apart from the iTunes Store (which is what the right-click > Get Album Artwork function uses).  For example, even though the Gracenote service that iTunes uses to match CDs and retrieve metadata (artist, album, track titles, etc.) also has artwork functions, iTunes does not make use of these.
    For manual addition of artwork, there are three cases where the image you select may not be correctly embedded in your media files:
    your media are in a format that doesn't accommodate embedded artwork - typically WAV files.  To embed artwork you'll need to convert to another format - Apple Lossless or AIFF if you want to preserve lossless quality, AAC or MP3 otherwise.
    your media files are read only - to fix this, use Windows Explorer to find the folder that contains your files, right-click and select Properties.  On the General tab there's a check box labeled "Read-only" - if this is checked, or is grey (sometimes blue), click the box so that the flag is unchecked and the box is white.  Click OK, and then OK again when the "Apply changes to this folder, subfolders and files" option selected.  Now try adding the artwork again.
    Windows permissions issues are preventing iTunes from updating your media files (there's some anecdotal evidence of a change in this behavior in iTunes 12).  See turingtest2's notes on Repair security permissions for iTunes for Windows for advice on fixing this, then try adding the artwork again.

  • How do I get iTunes on the iPad to NEVER show album artwork when clicking a song?

    Hi Folks,
    How do I get iTunes on the iPad to NEVER show album artwork when clicking a song?
    I go in-and-out of the iPod app quite a lot (I use the iPad to help me while practicing music and I use multiple apps), so it's frustrating to have to constantly close the album artwork. 
    Apologies - I saw many threads about this but none that answered how to ALWAYS stop iTunes from jumping to artwork.  If I missed the correct thread, I would appreciate a link.
    Thank you.

    That's what I thought - Apple generally has clean interfaces, so if I can't find an option to do something, it probably doesn't exist.
    Thank you for a quick answer - and yes, I'll add this feedback.
    I also just dropped Google feedback to PUT THE HOME LINK BACK IN THEIR LOGO.
    What madness came over them to remove it??
    I heard their engineers had a battle over this decision as well.

  • IPod Classic fails to sync after adding new music

    Hi, so lately I've been having problems with my 160GB classic, I've always had problems with it but its gotten to the point where I am frustrated beyond belief. SO the problem arises when I add new music, it comes up with the error 'XXXX's iPod cannot be written or read'' and before it displays this message the sync usually sticks on a song, a random song that I would've added. I restored it a few times, scanned and fixed it a few times and then when I noticed I started skipping songs, some in mid-song I restored it again and the problem repeats itself. Help would be appreciated

    A few issues, but sorry let me try to understand.
    Adding new music, 'XXXX's iPod cannot be written or read'' can you let me know the number. most likely music format is not iPod Compatible like HE-AAC.
    started skipping songs  - these are normally due to corrupted ID3 tags, try converting them -File-> Advance -> IPOD version or use MP3 validator to fix all songs in the library. (My Apologies, only work for MP3 music that skipped)
    As for item 2, you can try Hard Reset if you like to download MP3 validator.
    After charging till full charge, at least 2 hours (preferably 4 hours)
    Toggle the Hold switch, make sure you dont see the red mark when you do the  next step
    Reset the iPod -> Press Menu and Center button simultaneously for about 10 secs till the Apple Logo comes ON
    Then release the buttons
    Select your preferred language.
    Here is the Apple support Article on the 5Rs
    http://www.apple.com/support/ipod/five_rs/classic/
    Good Luck!

  • Itunes 10.4.1 not adding new music files

    I recently upgraded my itunes to 10.4.1 and am having trouble adding new music to my library which is contained on an external hard drive. My preference setting are correct, hard drive permissions are correct and have no problems playing any of my existing music. When I drag new music into itunes they are processed and it shows the tracks that I have attempted to copy, but they never get officially added to the library or copied to my media folder. Itunes just hangs there with each of the tracks having the little jog wheel next to it. Itunes isn't frozen as I can still navigate it and play existing songs, but those new songs never get added, copied or are able to be played. If I close itunes and relaunch it, ocassionly I will have succes adding an album, but I am looking at a success rate of 1 out of 10.  Where is the problem? Is it with itunes? Is it with my hard drive?
    Thanks,
    Andrew

    Hi,
    I'm also still having this problem and have posted numerous times on this over the last few months and it still hasnt been fixed, the only way to get around it is to recreate your library which is a pain as when I have done this not only do you lose new playlists because my HD lost connection to my mac/preferences it decided to consolidate my library and transfer a large section to my Mac....not good! I now also have a problem were when I copy in new items to Music it either creates a playlist or I get a spinning wheel!
    Im beyond bored of the new versions of iTunes and I'm thinking of moving to a more stable player as I waste numerous hours recreating library (which is a problem and waste of time) only for it to happen again!
    Pointless.
    I have also never seen a fix for this problem!

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • Is there a way to have bookmark folders automatically collapsed in Safari when adding bookmarks?  This would be a huge convenience in navigating to the right folder w/o having to deal with an eye chart of a folder tree.

    Is there a way to have bookmark folders automatically collapsed in Safari when adding bookmarks?  This would be a huge convenience in navigating to the right folder w/o having to deal with an eye chart of a folder tree.

    Myself as well...
    I think it is a tremendous problem. Im my case it is extremelly important to manage, organize and sort favorites.
    I am new to Mac and safari... and I spent a lot of time researching a solution for that thinking it was me that couldnt find this option. I like to use safari because of the "gestures". This is great. But when it comes to favorites, safari is a nightmare!!!
    Also, I use to like the option in Firefox that we can have the leftside bar with the favorites and navigate to the links in the right. In safari the links are open in the full page. And then we need to come back to the favorite everytime.
    I would be glad if someone could come out with good solution or suggestions how to deal with it in fafari.
    Regards.
    Miro

  • Can't add Album artwork to certain files.

    Hi, I've come across an anomaly in iTunes. There are certain audio files that cannot, for any reason update album artwork. I update album art work but selecting the file in iTunes then "get info" -> "add album artwork". But on certain files these tabs, as well as lyrics, are greyed out. The audio files are ACC 128bits. The only thing I found in common with the files that won't get album art work or lyrics is that they were encoded with iTunes 4.7. The only fix I can see is reconverting them in another version of iTunes, but this seems like a really dumb fix. Mostly I'm just wondering if there are any other people that have this problem and what fix you came up with, or what would cause a specific version of iTunes to not allow artwork.

    Instead of opening the album under "Get Info" and going into the Artwork tab, try clicking on the square box with a triangle in it located on the bottom left side of the iTunes window. This will display the ablum artwork inside the side bar. Click on the top of the album artwork box where it says "Now Playing" and it will change into "Selected Item". Select a song you're trying to get the album artwork for and see what it says in the box. If it says "Album Artwork Not Modifiable" then you might have a problem with the kind of file the music is. Granted, this shouldn't be any different than going into "Get Info" and trying it there, but at least this way you can tell for sure what the issue is. If the box says "Drag Album Artwork Here" then go ahead and drag the picture there and it should work. Sometimes checking the album artwork box helps you more understand what the issue is. Hope this helps!

  • How do I add album artwork in itunes 11.1.3.8? Copy and paste in artwork window on bottom right does not work.

    How do I add album artwork in itunes 11.1.3.8? Copy and paste to artwork box on bottom right in get info screen does not work.

    You can only join tracks when importing from a CD and likewise, the Options button is also only visible when importing from CD.
    When the CD is in the drive and showing in iTunes, you will see Options, CD Info and Import CD choices. If you select Options, the Join CD Tracks option only appears when you have two or more adjacent tracks selected. See the screenshots below:
    and

Maybe you are looking for

  • Font Issue with Smartforms

    I have developed a smartform where in i am using Helve 8.  I created the necessary font in the Printer setting and then transported to quality. The issue is This font works fine for all the languages except German. When I am displaying a German lang

  • Schedule reports fail - CrystalEnterprise.Smtp

    We have scheduled a report to run for all corporate employees.  When the schedule runs, here is what happens. - Report run and is marked in the running state - Report moves to pending state in history but the email is sent to recip. - Report moves ba

  • Command + R command gave strange Error Logs. Please help!

    I wanted to enter the recovery partition so to use disk utility. By using the cmd+r command after a restart my imac gave me the following error logs. I run 10.8.4 with an iMac12,2. Any ideas? Do I have to worry for something ? Nov 28 02:54:24 localho

  • Selection at infopackage level

    HI Everybody, Is it possible to have selection at infopackage level. Regards, BPNR.

  • Jdev 9.0.3 final hangs when starting in XP.

    Hi, I have updated my jDev with the latest release and i started immediately experiencing the following issues: (note that 9.0.2 ran just fine on the same machine and config.) - jDev hangs whenstarting (the progress-bar stops right before the end). w