Wiping a JPanel

The basic problem is I am attempting to wipe the contents of a JPanel. I select an option from a JTree and some images are displayed on my panel. I basically want to be able to select another item in my JTree and be able to have some more images displayed on the JPanel (with the original ones, not being present).
Any ideas how this can be done??

for this, you can have a setter method in your panel class and call repaint from there .. ex: class ImagePanel extends JPanel
.... //all the usual things
private java.awt.Image image;
public void setImage(java.awt.Image img)
   this.image = img;
   repaint();
public void paint(Graphics g)
   //draw the image as u want
   g.drawImage(image,0,0,this);
}Cheers,
Ramanujam

Similar Messages

  • Completely wiping a JPanel of all contents

    I have a GUI with various panels. On the main panel, I display image icons and some tick boxes. Is there basically a way to remove all components from this panel and then have the Panel "redisplayed"on my GUI. TO repeat, I basically want to be able to click on a button "wipe panel" and have this panel remain on my GUI but completely blank. I do not have access to my code at present and my initial idea is that when I do click on this button "wipe panel", I should simply add the panel to it's container again ie; like I did when I first load up the GUI, surely this should work??
    Thanks in advance for any suggestions or confirmation that I am correct (or code samples which will aid my understanding)

    Adding the panel to its container won't work; nothing will happen.
    You would need to remove the panel from its container, recreate the
    panel ( i.e, new JPanel() ) and add the newly created panel to the
    container.
    Alternatively, you can invoke removeAll() on the JPanel, which will
    remove all the components from the JPanel.

  • How can I hide a JPanel?

    I have some JPanels and using the mouse motion listeners you can scribble on them. I want to be able to switch between these panels but the problem is the drawings get wiped off when I use repaint() and frame.add(panel).
    Any ideas how else I could try doing this?

    Ok thanks everyone. I've taken the MyPanel class from here http://java.sun.com/docs/books/tutorial/uiswing/painting/step3.html
    class MyPanel extends JPanel {
        private int squareX = 50;
        private int squareY = 50;
        private int squareW = 20;
        private int squareH = 20;
        public MyPanel() {
            setBorder(BorderFactory.createLineBorder(Color.black));
            addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    moveSquare(e.getX(),e.getY());
            addMouseMotionListener(new MouseAdapter() {
                public void mouseDragged(MouseEvent e) {
                    moveSquare(e.getX(),e.getY());
        private void moveSquare(int x, int y) {
            int OFFSET = 1;
            if ((squareX!=x) || (squareY!=y)) {
                repaint(squareX,squareY,squareW+OFFSET,squareH+OFFSET);
                squareX=x;
                squareY=y;
                repaint(squareX,squareY,squareW+OFFSET,squareH+OFFSET);
        public Dimension getPreferredSize() {
            return new Dimension(250,200);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);      
            g.drawString("This is my custom Panel!",10,20);
            g.setColor(Color.RED);
            g.fillRect(squareX,squareY,squareW,squareH);
            g.setColor(Color.BLACK);
            g.drawRect(squareX,squareY,squareW,squareH);
    }Now if I use this class to make two panels, how can I hide one and bring the other one up and vice versa, using two buttons? setVisible() still doesn't work properly.
    Here's the whole code.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.SwingUtilities;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.BorderFactory;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseMotionListener;
    import java.awt.event.MouseMotionAdapter;
    public class PanelTest extends JFrame {
        private MyPanel panelOne;
        private MyPanel panelTwo;
        private BorderLayout layoutManager;
        private PanelTest() {
            layoutManager = new BorderLayout();
            this.setLayout(layoutManager);
            panelOne = new MyPanel();
            panelTwo = new MyPanel();
            panelOne.add(new JLabel("This is Panel One"));
            panelTwo.add(new JLabel("This is Panel Two"));
            setCurrentPanel(panelOne);
            JButton switchButton = new JButton("Switch");
            switchButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(getCurrentPanel() == panelOne) {
                        setCurrentPanel(panelTwo);
                    } else {
                        setCurrentPanel(panelOne);
            this.getContentPane().add(switchButton, BorderLayout.SOUTH);
            this.pack();
            this.setVisible(true);
        private void setCurrentPanel(MyPanel panel) {
            this.getContentPane().add(panel, BorderLayout.CENTER);
            panel.revalidate();
            panel.repaint();
        private JPanel getCurrentPanel() {
            return (JPanel)layoutManager.getLayoutComponent(BorderLayout.CENTER);
        public static void main(String[] args) {
            new PanelTest();
    class MyPanel extends JPanel {
        private int squareX = 50;
        private int squareY = 50;
        private int squareW = 20;
        private int squareH = 20;
        public MyPanel() {
            setBorder(BorderFactory.createLineBorder(Color.black));
            addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    moveSquare(e.getX(),e.getY());
            addMouseMotionListener(new MouseAdapter() {
                public void mouseDragged(MouseEvent e) {
                    moveSquare(e.getX(),e.getY());
        private void moveSquare(int x, int y) {
            int OFFSET = 1;
            if ((squareX!=x) || (squareY!=y)) {
                repaint(squareX,squareY,squareW+OFFSET,squareH+OFFSET);
                squareX=x;
                squareY=y;
                repaint(squareX,squareY,squareW+OFFSET,squareH+OFFSET);
        public Dimension getPreferredSize() {
            return new Dimension(250,200);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);      
            g.setColor(Color.RED);
            g.fillRect(squareX,squareY,squareW,squareH);
            g.setColor(Color.BLACK);
            g.drawRect(squareX,squareY,squareW,squareH);
    }Edited by: atom.bomb on Mar 30, 2010 11:25 AM

  • How to repaint a JPanel in bouncing balls game?

    I want to repaint the canvas panel in this bouncing balls game, but i do something wrong i don't know what, and the JPanel doesn't repaint?
    The first class defines a BALL as a THREAD
    If anyone knows how to correct the code please to write....
    package fuck;
    //THE FIRST CLASS
    class CollideBall extends Thread{
        int width, height;
        public static final int diameter=15;
        //coordinates and value of increment
        double x, y, xinc, yinc, coll_x, coll_y;
        boolean collide;
        Color color;
        Rectangle r;
        bold BouncingBalls balls; //A REFERENCE TO SECOND CLASS
        //the constructor
        public CollideBall(int w, int h, int x, int y, double xinc, double yinc, Color c, BouncingBalls balls) {
            width=w;
            height=h;
            this.x=x;
            this.y=y;
            this.xinc=xinc;
            this.yinc=yinc;
            this.balls=balls;
            color=c;
            r=new Rectangle(150,80,130,90);
        public double getCenterX() {return x+diameter/2;}
        public double getCenterY() {return y+diameter/2;}
        public void move() {
            if (collide) {
            x+=xinc;
            y+=yinc;
            //when the ball bumps against a boundary, it bounces off
            //bounce off the obstacle
        public void hit(CollideBall b) {
            if(!collide) {
                coll_x=b.getCenterX();
                coll_y=b.getCenterY();
                collide=true;
        public void paint(Graphics gr) {
            Graphics g = gr;
            g.setColor(color);
            //the coordinates in fillOval have to be int, so we cast
            //explicitly from double to int
            g.fillOval((int)x,(int)y,diameter,diameter);
            g.setColor(Color.white);
            g.drawArc((int)x,(int)y,diameter,diameter,45,180);
            g.setColor(Color.darkGray);
            g.drawArc((int)x,(int)y,diameter,diameter,225,180);
            g.dispose(); ////////
        ///// Here is the buggy code/////
        public void run() {
            while(true) {
                try {Thread.sleep(15);} catch (Exception e) { }
                synchronized(balls)
                    move();
                    balls.repairCollisions(this);
                paint(balls.gBuffer);
                balls.canvas.repaint();
    //THE SECOND CLASS
    public class BouncingBalls extends JFrame{
        public Graphics gBuffer;
        public BufferedImage buffer;
        private Obstacle o;
        private List<CollideBall> balls=new ArrayList();
        private static final int SPEED_MIN = 0;
        private static final int SPEED_MAX = 15;
        private static final int SPEED_INIT = 3;
        private static final int INIT_X = 30;
        private static final int INIT_Y = 30;
        private JSlider slider;
        private ChangeListener listener;
        private MouseListener mlistener;
        private int speedToSet = SPEED_INIT;
        public JPanel canvas;
        private JPanel p;
        public BouncingBalls() {
            super("fuck");
            setSize(800, 600);
            p = new JPanel();
            Container contentPane = getContentPane();
            final BouncingBalls xxxx=this;
            o=new Obstacle(150,80,130,90);
            buffer=new BufferedImage(getSize().width, getSize().height, BufferedImage.TYPE_INT_RGB);
            gBuffer=buffer.getGraphics();
            //JPanel canvas start
            final JPanel canvas = new JPanel() {
                final int w=getSize().width-5;
                final int h=getSize().height-5;
                @Override
                public void update(Graphics g)
                   paintComponent(g);
                @Override
                public void paintComponent(Graphics g) {
                    super.paintComponent(g);
                    gBuffer.setColor(Color.ORANGE);
                    gBuffer.fillRect(0,0,getSize().width,getSize().height);
                    gBuffer.draw3DRect(5,5,getSize().width-10,getSize().height-10,false);
                    //paint the obstacle rectangle
                    o.paint(gBuffer);
                    g.drawImage(buffer,0,0, null);
                    //gBuffer.dispose();
            };//JPanel canvas end
            addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
            addButton(p, "Start", new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    CollideBall b = new CollideBall(canvas.getSize().width,canvas.getSize().height
                            ,INIT_X,INIT_Y,speedToSet,speedToSet,Color.BLUE,xxxx);
                    balls.add(b);
                    b.start();
            contentPane.add(canvas, "Center");
            contentPane.add(p, "South");
        public void addButton(Container c, String title, ActionListener a) {
            JButton b = new JButton(title);
            c.add(b);
            b.addActionListener(a);
        public boolean collide(CollideBall b1, CollideBall b2) {
            double wx=b1.getCenterX()-b2.getCenterX();
            double wy=b1.getCenterY()-b2.getCenterY();
            //we calculate the distance between the centers two
            //colliding balls (theorem of Pythagoras)
            double distance=Math.sqrt(wx*wx+wy*wy);
            if(distance<b1.diameter)
                return true;
            return false;
        synchronized void repairCollisions(CollideBall a) {
            for (CollideBall x:balls) if (x!=a && collide(x,a)) {
                x.hit(a);
                a.hit(x);
        public static void main(String[] args) {
            JFrame frame = new BouncingBalls();
            frame.setVisible(true);
    }  And when i press start button:
    Exception in thread "Thread-2" java.lang.NullPointerException
    at fuck.CollideBall.run(CollideBall.java:153)
    Exception in thread "Thread-3" java.lang.NullPointerException
    at fuck.CollideBall.run(CollideBall.java:153)
    Exception in thread "Thread-4" java.lang.NullPointerException
    at fuck.CollideBall.run(CollideBall.java:153)
    and line 153 is: balls.canvas.repaint(); in Method run() in First class.
    Please help.

    public RepaintManager manager;
    public BouncingBalls() {
            manager = new RepaintManager();
            manager.addDirtyRegion(canvas, 0, 0,canvas.getSize().width, canvas.getSize().height);
        public void run() {
            while(true) {
                try {Thread.sleep(15);} catch (Exception e) { }
                synchronized(balls)
                    move();
                    balls.repairCollisions(this);
                paint(balls.gBuffer);
                balls.manager.paintDirtyRegions(); //////// line 153
       but when push start:
    Exception in thread "Thread-2" java.lang.IllegalMonitorStateException
    at java.lang.Object.notifyAll(Native Method)
    at fuck.CollideBall.run(CollideBall.java:153)
    Exception in thread "Thread-3" java.lang.IllegalMonitorStateException
    at java.lang.Object.notifyAll(Native Method)
    at fuck.CollideBall.run(CollideBall.java:153)
    i'm newbie with Concurrency and i cant handle this exceptons.
    Is this the right way to do repaint?

  • Problem with JPanel and/or Thread

    Hello all,
    I have the following problem.
    I have a JFrame containing to JPanels. The JPanels are placed
    via BorderLayout.
    JPanel #1 is for moving a little rectangle (setDoubleBufferd), it is
    a self defined object extending JPanel.
    The paint methon in JPanel #1 has been overwritten to do the drawings.
    JPanel #2 contains 4 JButtons, but they have no effect at the
    moment. It is an "original" JPanel.
    The class extending JFrame implemented the interface Runnable and
    is started in its own thread.
    After starting the programm everthing looks fine.
    But if I press a Button in the second JPanel this button is painted in
    the top left corner of my frame. It changes if I press another button.
    Any help would be appreciated.
    Thanks.
    Ralf

    I have a JFrame containing to JPanels. The JPanels are
    placed
    via BorderLayout.The type of Layout does not seem to be relevant
    >
    JPanel #1 is for moving a little rectangle
    (setDoubleBufferd), it is
    a self defined object extending JPanel.
    The paint methon in JPanel #1 has been overwritten to
    do the drawings.
    JPanel #2 contains 4 JButtons, but they have no effect
    at the
    moment. It is an "original" JPanel.
    The class extending JFrame implemented the interface
    Runnable and
    is started in its own thread.
    After starting the programm everthing looks fine.
    But if I press a Button in the second JPanel this
    button is painted in
    the top left corner of my frame. It changes if I press
    another button.
    I noticed you solved this by painting the whole JFrame.
    Yeh Form time to time I get this problem too......
    Especially if the screen has gone blank - by going and having a cup of tea etc -
    Text from one Panel would be drawn in another.. annoying
    At first it was because I changed the state of some Swing Components
    not from the Event Thread.
    So make sure that your new Thread doesn't just blithely call repaint() or such like cos that leads to problems
    but rather something like
    SwingUtilities.invokeLater( new Runnable()
       public void run()
          MyComponent.repaint();
    });However I still get this problem using JScrollPanes, and was able to fix it by using the slower backing store method for the JScrollPane
    I could not see from my code how something on one JPanel can get drawn on another JPanel but it was happening.
    Anyone who could totally enlighten me on this?

  • How to give Common Background color for all JPanels in My Swing application

    Hi All,
    I am developing a swing application using The Swing Application Framework(SAF)(JSR 296). I this application i have multiple JPanel's embedded in a JTabbedPane. In this way i have three JTabbedPane embedded in a JFrame.
    Now is there any way to set a common background color for the all the JPanel's available in the application??
    I have tried using UIManager.put("Panel.background",new Color.PINK);. But it did not work.
    Also let me know if SAF has some inbuilt method or way to do this.
    Your inputs are valuable.
    Thanks in Advance,
    Nishanth.C

    It is not the fault of NetBeans' GUI builder, JPanels are opaque by default, I mean whether you use Netbeans or not.Thank you!
    I stand corrected (which is short for +"I jumped red-eyed on my feet and rushed to create an SSCCE to demonstrate that JPanels are... mmm... oh well, they are opaque by default... ;-[]"+)
    NetBeans's definitely innocent then, and indeed using it would be an advantage (ctrl-click all JPanels in a form and edit the common opaque property to false) over manually coding
    To handle this it would be better idea to make a subclass of JPanel and override isOpaque() to return false. Then use this 'Trasparent Panel' for all the panels where ever transparency is required.I beg to differ. From a design standpoint, I'd find it terrible (in the pejorative sense of the word) to design a subclass to inconsistently override a getter whereas the standard API already exposes the property (both get and set) for what it's meant: specify whether the panel is opaque.
    Leveraging this subclass would mean changing all lines where a would-be-transparent JPanel is currently instantiated, and instantiate the subclass instead.
    If you're editing all such lines anyway, you might as well change the explicit new JPanel() for a call to a factory method createTransparentJPanel(); this latter could, at the programmer's discretion, implement transparency whichever way makes the programmer's life easier (subclass if he pleases, although that makes me shudder, or simply call thePanel.setOpaque(false) before returning the panel). That way the "transparency" code is centralized in a single easy to maintain location.
    I had to read the code for that latter's UI classes to find out the keys to use (+Panel.background+, Label.foreground, etc.), as I happened to not find this info in an authoritative document - I see that you seem to know thoses keys, may I ask you where you got them from?
    One of best utilities I got from this forum, written by camickr makes getting these keys and their values very easy. You can get it from his blog [(->link)|http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/]
    Definitely. I bit a pair of knucles off when discovered it monthes after cumbersomely traversing the BasicL&F code...
    Still, it is a matter-of-fact approach (and this time I don't mean that to sound pejorative), that works if you can test the result for a given JDK version and L&F, but doesn't guarantee that these keys are there to stand - an observation, but not a specification.
    Thanks TBM for highlighting this blog entry, that's the best keys list device I have found so far, but the questions still holds as to what specifies the keys.
    Edited by: jduprez on Feb 15, 2010 10:07 AM

  • Problem with JPanel in JFrame

    hai ashrivastava..
    thank u for sending this one..now i got some more problems with that screen .. actually i am added one JPanel to JFrame with BorderLayout at south..the problem is when i am drawing diagram..the part of diagram bellow JPanel is now not visible...and one more problem is ,after adding 6 ro 7 buttons remaing buttons are not vissible..how to increase the size of that JPanel...to add that JPanel i used bellow code
    JFrame f = new JFrame();
    JPanel panel = new JPanel();
    f.getContentPane().add(BorderLayout.SOUTH, panel);

    Hi
    JFrame f = new JFrame();
    JPanel panel = new JPanel();
    // Add this line to ur code with ur requiredWidth and requiredHeight
    panel.setPreferredSize(new Dimension(requiredWidth,requiredHeight));
    f.getContentPane().add(BorderLayout.SOUTH, panel);
    This should solve ur problem
    Ashish

  • I purchased an album and it has disappered from my iPod however other purchased items are showing. How can I get the album back? It is not on my computer on the itunes library due to the computer wiping all contents.

    My ipod touch lost all its data due to my computer crashing and having to be rebooted.
    This resulted in all software being wiped - including iTunes. Therefore, I lost all my music, apps etc on my library on the computer. I then synced my iPod into the computer which then updated the ipod software and then it cleared all my music.
    However, I managed to find my music on the purchased list and was able to re download it.
    Although, I'm aware that one album did not apper on the purchased playlist - I have an email to prove that I purchased this album however, it is not appearing to allow for me to download it.
    I am pretty sure that this is not the only album but due to the amount of music I previously had on my iPod it is difficult to tell what is missing.
    Is there anything I can do to get all my previous music back?
    Is there anything I can do by contacting Apple to see if they can help?
    Would greatly appreciate any help whatsoever! Just about pulling my hair out - due to no available phone calls until next thursday and NO email address to contact!

    Thanks very much I have contacted them via this. Just hope they respond quickly- rather annoing! Greatly appreciated though

  • Please HELP!  My kid wiped my iPhone5 and I need to get my photos and videos off it!  I have no backup with iTunes :((  Is there a way to scan the device manually?

    hi,
    New to this, so go easy on me.  I recently got my first iDevice - an iPhone 5.  I've used it for a month now and I have to say I love it. 
    But, I gave it to my kid this morning to look at.  It was locked, so I assumed it was safe.  WRONG.  5 mins later, I returned to him and my lovely iPhone5 was at the setup /pick your language screen!  Looks like he entered the password incorrectly too many times and wiped it.
    Now - I thought it would be fairly easy to recover the data and the apps - but it turns out this is not the case.   I was never prompted to install iTunes and sync the device - not in the manual, not on the device when setting it up - so how was I to know that that would be my backup.  I checked iCloud at a suggestion of an IT pal - nothing there, despite knowing that I had a Photo stream enabled.  I may have disabled it only recently, but not sure if I can manually turn it on again?
    Anyway - is there a way to manually scan my device and grab my all important photos and videos?
    Cheers for any suggestions!

    Hi Michela27,
    Thanks for visiting Apple Support Communities.
    If you have content on your iPhone that isn't on your computer, the best thing is to use the advice in this article to transfer it to your new computer before setting up sync:
    iTunes: Transferring media from your iPhone, iPad, iPod touch, or iPod
    http://support.apple.com/kb/HT1209
    Cheers,
    Jeremy

  • My iPod Touch is running on ios 7. In the last two and a half months all the apps of my iPod have been wiped out twice. I had to download all the apps all over again. Why is this happening?

    My iPod Touch is running on ios 7. In the last two and a half all the apps of my iPod have been suddenly wiped out twice. I had to download all the apps all over again. Why has it happened?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                              

  • Can days in iCal freeze?  A whole week of my Ical is wiped/frozen

    There is a day in my iCal that is completely frozen.  I was recently doing some planning and viewing some of my past events and I noticed that in 'week view' a whole week of events was missing.  That week wasn't editible either- I can't add events to it or do any editing at all (even though there's nothing to edit because it's completely wiped.
    What's more weird is that when I went in to "day view" for this week that had seemed to have been wiped, every day had the days events showing and they were editable except for one single day- a Wednesday.  Again, for that day I can't add or edit anything and it's blank, even though there used to be events in it.  I still have those events in my Iphone
    When I go back into week view for this week, I can't see any events for the whole week, even though they show up in the day view for all of the days but that one. 
    Has anyone else had this problem?  I have all the events for these days in my Iphone still but syncing doesn't seem to be helping.  This all is driving me crazy.  Any help would be much appreciated.  Thanks!

    Greetings,
    Might just be a bad cache / preference file.
    Troubleshooting:
    1.) Backup all your data:
    Backup your iPhone: http://support.apple.com/kb/HT1414
    Backup your computer Addressbook: http://docs.info.apple.com/article.html?path=AddressBook/4.0/en/ad961.html
    Backup your computer iCal: http://support.apple.com/kb/HT2966
    2.) Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical and / or "ical"
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    __NOTE: Removing these files will remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    Once the computer is back up and running open iCal and test.
    Hope that helps!

  • I have moved all my songs onto a new external hard drive but it has wiped my iPod clean. Although when I connect my iPod it's starts teh process of sync'ing - so many songs in I get a pop up advising the siong could not be read or written to?

    I  have moved all my itunes onto a new external hard drive to free up space. It has wiped my ipod clean! I can still see the itunes on the new hard drive so I restored my iPod and tried to sync. Although when I connect my iPod it's in the process of syncing, so many songs in I get a pop up saying could not copy to my iPod as xyz song title could not be read or written. I click ok for this pop up to dissapear and then another pop up appears saying could not coyp to iPod because of unknown error.!!! Help I'm going crazy.

    Did you go into iTunes to change the location of your media files? if not you will need to go into iTunes and click on preference and select the advance tab then click the iTunes Media folder location.  Select the location of your on external hard drive. 

  • HT1363 Got iTunes 11.0.2 and iPod classic. ITunes no longer connects to iPod - wiped all contents and there is no way to re-connect - is this normal?

    Got iTunes 11.0.2 - as far as I know the latest version. My iPod classic no longer connects - gone through all on the "help" still won't work. There is nowhere with the word "device" and the iPod has now been wiped clean. Is this normal with the new version?

    You might want to try connecting to another computer with an older version of iTunes. If it connects, reformat it straight away just in case before adding your songs back in. Otherwise, you might want to seek for help at the official iTunes stores in your country. Chances are that the iPod might be corrupted, though iTunes being the problem can't be ruled out either.

  • Can't fully restore my Time Machine/Time Capsule Backup to my newly-wiped SSD/HDD

    On receiving my leased, Bootcamp-enabled MacBook Pro, I saw that there were no installation discs for Windows or OSX, and that there were 2 partitions (or so I thought) for Mac and Windows: 375GB each. As I produce music using software in both OSs, I wanted to create a 185GB FAT-32 partition to store my sound samples, projects etc. I attempted to create this partition by resizing (halving) my Bootcamp partition in OSX Disc Utility. The first time I attempted it, resizing was possible, but after the new partition was created, I had problems booting and so had to edit my GPT in order to boot again. Once ‘fixed,’ (by deleting the new partition) I couldn’t resize the Bootcamp partition to fill the 185GB gap, and that 185GB was ‘lost.’ The Bootcamp partition was 375GB but its used space + free space added up to 190GB
    So the other day, I tried to follow what I thought was a more logical approach, which I was *sure* would work. My plan was to:
    Use Windows Backup (and/or Clonezilla, or Disk Utility) to store an image of my Windows partition.
    Uninstall/wipe the Windows partition using BootCamp Assistant, creating 1 big OSX partition
    Use BootCamp Assistant to re-partition the HDD for Windows, OSX and ‘shared,’ and then re-install Windows, leaving 175GB for shared music production files
    Restore the image/backups (approx 70GB) and carry on as before.
    During the process, I deemed that this wasn't possible on my system for a variety of reasons: My laptop already had 4 partitions (Windows Recovery, Bootcamp/Windows, Mac Recovery HD, and Mac) and my understanding is that the MBR of my SSD only supports 4 partitions in its Bootcamp + OSX-compatible state. I have never got this '5 partition' strategy working.
    I was unable to restore my Windows partition after re-installing Windows via Bootcamp. As a solution, I then decided to wipe the OSX partition (at that point the only 'visible' partition on the disk) and in-place re-install Mac OS X, with a view to installing Windows after OSX.
    Once I wiped my hard drive, however, restoring my files and settings, didn't work as expected. Time Machine backups etc were inaccessible after a normal re-install. Re-installing with file transfer at setup froze at the 10% mark, with an estimated 200 hrs to go. The option to try a full-system restore via Time Machine is greyed-out. Even the Migration Assistant failed at a similar point. On the occasions where it claimed to complete successful (most recent situation) it seemed to neglect files, etc., and I'm now stuck at this stage.
    I can view files/backups in Time Machine but I can't completely restore my computer to the state it was on 18th May...and 11 days without a fully-functioning laptop is really annoying. I wasn't able to ‘clean’ *or* ‘in-place’ re-install OSX using my existing settings and so I'm frustrated that Time Machine isn't a flawless backup & restore process. Migration Assistant didn’t transfer everything. Can I get things back to the way they were?
    Things that haven’t restored correctly:
    None of my icon customisations at the top of the screen were there (DropBox, Evernote, Google Drive, Kuvva, the way battery icon was displayed
    Safari: Top Sites, History, Plugins
    Logic Pro: Downloaded sounds, presets (10+GB), recent items, plugin settings/AU manager
    Mail: Settings (and I’m assuming, the downloaded/cached mail: 7GB)
    Trash can: Empty
    All recent item lists apart from cloud-based services like Evernote, Notes, contacts
    iTunes library
    Dock view and settings
    Settings for most programs
    And I'm sure there are more!

    Thanks Pondini; I'd hoped you'd reply. I'm still getting used to this tech, no can't even quote here.
    Pondini wrote:
    AkaraE wrote:
    Time Machine backups etc were inaccessible after a normal re-install.
    If you mean you installed OSX and created a user account, then couldn't find the backups, that's because they're treated as being from a different disk, until you either transfer your data or do a manual "associatedisk".  See the blue box in Time Machine - Frequently Asked Question #19 for details.
    Yet to try the associatedisk...didn't realise this was possible until reading your guides. The explanation makes sense now. On installing OSX it said transfers were possible after installation, so I put off transferring as the first 'restore' had frozen on 10%, thinking I'd do it afterwards.
    Re-installing with file transfer at setup froze at the 10% mark, with an estimated 200 hrs to go
    That sounds like damaged/corrupted backups. Try to Repair them, per #A5 in Time Machine - Troubleshooting.
    Yet to try...didn't realise this was possible until reading your guides
    The option to try a full-system restore via Time Machine is greyed-out.
    You mean, on the Mac OS X Utilities menu on the Recovery HD?  I've never heard of that.  That should always be selectable, so you can specify where the backups you want are located.  Nothing happens when you click it?  Can you click the other options there?
    Even the Migration Assistant failed at a similar point. On the occasions where it claimed to complete successful (most recent situation) it seemed to neglect files, etc., and I'm now stuck at this stage.
    Also sounds like directory or file problems on the backups.
    This is just when I go into Time Machine/Star Wars. I can't just go to the latest backup and click "Restore" (which I assume would just restore my whole computer/HDD, although I have no experience in this). I can only select files and restore them individually. 
    Time Machine isn't a flawless backup & restore process.
    There has never been any such thing.
    I bought into the Time Machine 'hype' and thought it was an easy and reliable tool, but was a lot more difficult to do a full restore than I thought. 
    Trash can: Empty
    Correct.  Time Machine (like most backup apps) don't back up trash.
    All the rest should have been backed-up and restored.  Do you see them in the backups?  What, if anything, was excluded from being backed-up?
    As a non-native Mac user, I'm not sure where all these things are stored...perhaps in Library? I think that not having the full hard-drive just restore annoyed me...I felt that backing up my whole hard drive every hour should've allowed me to restore everything to as it was without a hitch, and when it didn't work I just tried a few things before posting on here.
    If repairing the backups finds and fixes things, you might want to try again.
    Gonna try now
    If not, and if you can see the missing items via the Time Machine browser (the "Star Wars" display), you should be able to restore them selectively.

  • If someone has wiped my ipad and changed passwords on icloud how do i get my data back

    if someone has wiped my ipad and changed passwords on icloud how do i get my data back? please could someone help me out thanks

    How did they wipe it?  By using Find My iPad and performing a wipe?  If so, that means they have your icloud ID and password, not a good thing.
    You could try connecting it to iTunes and performing a restore from iCloud.  But if they changed password, then you are out of the loop.  How did they get your password in order to change it?

Maybe you are looking for

  • With FF 23.0.1, I can no longer replace the standard Firefox icon in Snow Leopard to match the rest of my icon scheme -- why not?

    Hi. I use a custom icon scheme in Snow Leopard 10.6.8 on my Mac Pro. Normally, when Firefox updates itself, its icon is reset to the default. I then change it back to my custom icon by the normal method: go to Get Info, unlock the access settings, pa

  • Set the archive bit on files in a folder?

    While viewing files on my Mac from Windows machines on my network, the archive bit seems to be set on the files in soe directories. Setting the archive bit from the Windows machine appears to work, but the bit doesn't really get reset, as a quick ref

  • Buying iPod

    I know I'm not up-to-date, coz I don't have iPod, and most of the poeple have one. Anyways I'm gonna buy iPod (actually i'm gonna get one for my b-day :)). And it would be great if someone would tell me what's in the box. And about connecting iPod to

  • Support Non-Existant?

    Okay so, going back over this, I sent a ticket with old skype support about a charge back to get an account restriction lifted off of my account... they could not help me and I could not give them the information required because the information has

  • Unable to update ipad 1 with ios 7

    i have reset my ipad 2 times to factory settings and im stuck with ios 5.1 and i can not update it whats so ever.