JButton, actionlistener, that works!!!!!!

As I said I have looked endlessly through tutorials and found everything except what I want. All the examples have been applets and I
have a JFrame with a JButton in it. ALL I WANT TO DO....Is make the button have an action (click on button - "Yo" is printed)
This seems impossible to me, surely someone here must know how to do it.... anyway here is what I have...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class action extends JFrame implements ActionListener {
public JFrame window = new JFrame("window title");
public action(String text)
Toolkit theKit = window.getToolkit();
window.setBounds(400,400,400,400); //get toolkit / set bounds
GridLayout grid = new GridLayout(1,1); // set up simple grid
Container content = window.getContentPane(); // prepare content (container)
content.setLayout(grid); // set grid
JButton button = new JButton("Button"); // draw button
button.addActionListener(this); // set up listener
public void actionPerformed(ActionEvent e) { // actionEvent to be triggered when button pressed
System.out.println("It WORKED!!!!!!!!!!!!!!! GO TAMPA BAY!!");
When I do this I get this error no matter what I try!!!
Exception in thread "main" java.lang.NoSuchMethodError: main
Anyone know how I can make this work, thanks!!

You're getting the main error message because when you run a Java application, it's looking for the main method, which you don't have.
Here's a sample JFrame:
import java.awt.event.*;
import javax.swing.*;
public MyFrame extends JFrame implements ActionListener {
     public MyFrame() {
          JButton button = new JButton("OK");
          this.getContentPane().add(button);
          button.addActionListener(this);
          this.setSize(400, 300);
          this.setVisible(true);
          this.setDefaultCloseOpeartion(JFrame.EXIT_ON_CLOSE);
     public static void main(String[] args) {
          new MyFrame();
     public void actionPerformed(ActionEvent e) {
          System.out.println("Click");
}

Similar Messages

  • ActionListener not working with JFrame

    Hi,
    I've just rehashed an old bit of code to work with a new application but for some reason the JButton ActionListeners aren't working. However if I extend JDialog they work ok. The current code for JDialog is:-
    * File:     GUI.java
    * @author           ODL 3xx Distributed Systems - Team x
    * @description      This class provides a means for the user to
    *                    interact with file server.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    public class GUI extends JDialog implements ActionListener, ApplicationConstants {
        private JLabel label1, label2, label3, label4, label5;
        private JTextField field1, field2, field3, field4, field5;
        private JButton button1, button2, button3, button4, button5;
        private Container container;
        private Message sendFile;
        private String id;
        private String defaultText = "Enter file name here";
        private ClientForGUI client;
        private long timeStart, timeEnd;
        public GUI(JFrame frame) {
            super(frame, "File Server Actions", true);
            client = new ClientForGUI(this);
            try{
                   InetAddress addr = InetAddress.getLocalHost();
                   id = addr.getHostName() + Long.toString((new java.util.Date()).getTime());
                   if(client.connectToServer())
                   initGUI();
                   else{
                        JOptionPane.showMessageDialog(this, "Unable to connect to server", "Error", JOptionPane.WARNING_MESSAGE);
                        System.exit(0);
              catch(UnknownHostException uhe){
                   System.out.println("Unknown Host Exception");
            initGUI();
         * Create the GUI
        private void initGUI() {
            container = this.getContentPane();
            container.setLayout(null);
            label1 = new JLabel("Upload File");
            label2 = new JLabel("Rename File");
            label3 = new JLabel("Delete File");
            label4 = new JLabel("Create File");
            label5 = new JLabel("Download File");
            field1 = new JTextField();
            field2 = new JTextField();
            field3 = new JTextField();
            field4 = new JTextField();
            field5 = new JTextField();
            button1 = new JButton("Upload");
            button2 = new JButton("Rename");
            button3 = new JButton("Delete");
            button4 = new JButton("Create");
            button5 = new JButton("Download");
            label1.setBounds(10,10,80,20);
            label2.setBounds(10,40,80,20);
            label3.setBounds(10,70,80,20);
            label4.setBounds(10,100,80,20);
            label5.setBounds(10,130,80,20);
            field1.setBounds(100,40,200,20);
            field1.setText("Old name");
            field2.setBounds(310,40,200,20);
            field2.setText("New name");
            field3.setBounds(100,70,410,20);
            field3.setText(defaultText);
            field4.setBounds(100,100,410,20);
            field4.setText(defaultText);
            field5.setBounds(100,130,410,20);
            field5.setText(defaultText);
            button1.setBounds(100,10,100,20);
            button1.addActionListener(this);
            button2.setBounds(520,40,100,20);
            button2.addActionListener(this);
            button3.setBounds(520,70,100,20);
            button3.addActionListener(this);
            button4.setBounds(520,100,100,20);
            button4.addActionListener(this);
            button5.setBounds(520,130,100,20);
            button5.addActionListener(this);
            container.add(label1);
            container.add(button1);
            container.add(label2);
            container.add(field1);
            container.add(field2);
            container.add(button2);
            container.add(label3);
            container.add(field3);
            container.add(button3);
            container.add(label4);
            container.add(field4);
            container.add(button4);
            container.add(label5);
            container.add(field5);
            container.add(button5);
            setSize(640,200);
            setResizable(false);
            //Centre on the screen
            Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
              int x = (int) ((d.getWidth() - getWidth()) / 2);
              int y = (int) ((d.getHeight() - getHeight()) / 2);
              setLocation(x,y);
            setVisible(true);
        private void sendMessageToServer(Message message){
             message.setId(id);
             timeStart = new java.util.Date().getTime();
             try{
                  client.sendMessageToServer(message);
             catch(IOException ioe){
                  System.out.println("Unable to send message to server");
          * Perform some action based on user interaction
          * @param ae - ActionEvent
        public void actionPerformed(ActionEvent e){
            Object o = e.getSource();
            String name;
            if(o == button1){
                 try{
                        JFileChooser fc = new JFileChooser();
                       fc.setVisible(true);
                      //return value is what the user presses in the open File dialog
                      int returnVal = fc.showOpenDialog(null);
                      //if they choose OK
                      if (returnVal == JFileChooser.APPROVE_OPTION) {
                             //file now references the selected
                             File file = fc.getSelectedFile();
                             //create a FileInputStream from file location
                             FileInputStream fis = new FileInputStream(file);
                             // Create the byte array to hold the data, the same size as the file
                             byte [] fileBytes = new byte[(int)file.length()];
                              // Read in the bytes from the file into the byte array
                              int offset = 0;
                              int numRead = 0;
                              while (offset < fileBytes.length &&
                             (numRead=fis.read(fileBytes, offset, fileBytes.length-offset)) >=
                             0) {
                                  offset += numRead;
                             // Ensure all the bytes have been read in
                             if (offset < fileBytes.length) {
                                  throw new IOException("Could not completely read file "+file.getName());
                             fis.close();
                             sendFile = new Message(SEND_FILE, fileBytes);
                             sendFile.setId(id);
                             sendFile.setFileName(file.getName());
                             byte [] myarray = ConvertData.messageToBytes(sendFile);
                             Message sendWarning = new Message(SEND_FILE_WARNING);
                               sendWarning.setFileName(file.getName());
                              sendWarning.setFileSize(myarray.length);
                              try{
                                    sendMessageToServer(sendWarning);
                               catch(Exception excep){
                                    System.out.println(excep);
                   catch(FileNotFoundException fnfe){
                        System.out.println("File Not Found Exception");
                   catch(java.io.IOException ioe){
                        System.out.println("IO Exception");
            else if(o == button2){
                   name = field1.getText();
                   String name2 = field2.getText();
                   Message renameMessage = new Message(RENAME_FILE);
                   renameMessage.setFileName(name);
                   renameMessage.setFileRename(name2);
                   sendMessageToServer(renameMessage);
                   field1.setText("Old name");
                   field2.setText("New name");
            else if(o == button3){
                   name = field3.getText();
                   Message deleteMessage = new Message(DELETE_FILE);
                   deleteMessage.setFileName(name);
                   sendMessageToServer(deleteMessage);
                   field3.setText(defaultText);
            else if(o == button4){
                   name = field4.getText();
                   Message createMessage = new Message(CREATE_FILE);
                   createMessage.setFileName(name);
                   sendMessageToServer(createMessage);     
                   field4.setText(defaultText);     
            else if(o == button5){
                   name = field5.getText();
                   Message downloadMessage = new Message(REQUEST_FILE);
                   downloadMessage.setFileName(name);
                   sendMessageToServer(downloadMessage);
                   field5.setText(defaultText);          
        public void processServerMessage(Message message){
             switch(message.getMessageHeader()){
                   case SEND_FILE_WARNING:
                   //change the download size to file size plus max message size
                   client.setDownload((int)message.getFileSize(),true);
                   //turn message back around with acknowledgement header
                   message.setMessageHeader(SEND_FILE_ACK);
                   //send the message
                   try{
                        sendMessageToServer(message);
                   catch(Exception e){
                        System.out.println(e);
                   break;
                   //server has acknowledged that the client wishes to send a message
                   //so send the message
                   case SEND_FILE_ACK:
                   //send the message
                   try{
                        sendMessageToServer(sendFile);
                   catch(Exception e){
                        System.out.println(e);
                   break;
                   //server is sending the file to the client.
                   case SEND_FILE:
                   //reset the download size to default
                   client.setDownload(DEFAULT_MESSAGE_SIZE,false);
                   //get the file name
                   File f = new File(message.getFileName());
                   //create the file chooser
                   JFileChooser fc = new JFileChooser();
                   //set selected file as thoe one downloaded
                   fc.setSelectedFile(f);
                   //get the button hit by the user
                 int returnVal = fc.showSaveDialog(null);
                 //if button is OK
                  if (returnVal == JFileChooser.APPROVE_OPTION){
                       File temp = fc.getCurrentDirectory();
                       String [] files = temp.list();
                       java.util.List alist = java.util.Arrays.asList(files);
                       f = fc.getSelectedFile();
                       if(alist.contains(message.getFileName())){
                            if(JOptionPane.showConfirmDialog(null,
                                       message.getFileName() + " already exists. Are you sure you want to overwrite this file?",
                                       "Instant Messenger: Quit Program",
                                       JOptionPane.YES_NO_OPTION,
                                       JOptionPane.QUESTION_MESSAGE,
                                       null) == JOptionPane.YES_OPTION) {
                                            //f = fc.getSelectedFile();
                                            System.out.println(f.toString());
                                           //this is where the file is copied
                                           try{
                                                FileOutputStream fs = new FileOutputStream(f);
                                                 fs.write(message.getFile());
                                                 fs.close();
                                           catch(IOException e){
                                                System.out.println(e);
                            else fc.hide();
                       else{
                            System.out.println("Here " + f.toString());
                            try{
                                 FileOutputStream fs = new FileOutputStream(f);
                                  fs.write(message.getFile());
                                  fs.close();
                            catch(IOException e){
                                 System.out.println(e);
                  else fc.hide();
                  break;
                  case INFORMATION:
                  timeEnd = new java.util.Date().getTime();
                  Long rtrip = timeEnd - timeStart;
                  String str = Long.toString(rtrip);
                  double d = Double.valueOf(str).doubleValue();
                  String fullMessage = message.getMessage();
                  fullMessage += " The total time taken for the last request was " +
                  rtrip + " milliseconds" + " or roughly " + d/1000 + " seconds";
                   JOptionPane.showMessageDialog(null,fullMessage,"Information",JOptionPane.INFORMATION_MESSAGE);
                   break;          
    class TestGUI{
        public static void main(String [] args){
             JFrame frame = new JFrame();
             GUI myGUI = new GUI(frame);
    }     If I change the GUI constructor to empty and extend JFrame instead of JDialog and change the call to super the ActionListener stops working. I've never known this problem before (i.e. I always use e.getSource()). I've even cast the object to a JButton to ensure that the right button is pressed and it is all ok.
    Is there something fundamentally wrong when I make those simple changes to JFrame?
    Regards,
    Chris

    I think rather the approach is your action handling in terms of the buttons. The giant actionPerformed method is difficult to read and maintain.
    I would recommend the following things:
    1. Split your ActionListener into multiple smaller listeners. There's not really even a reason for the GUI class to be an action listener. Instead of having GUI implement ActionListener and trying to keep all of the functionality in one place, use anonymous classes:
    button3.addActionListener(new ActionListener()
        public void actionPerformed(ActionEvent e)
            name = field3.getText();
            Message deleteMessage = new Message(DELETE_FILE);
            deleteMessage.setFileName(name);
            sendMessageToServer(deleteMessage);
            field3.setText(defaultText);
    button4.addActionListener(new ActionListener()
        public void actionPerformed(ActionEvent e)
            name = field4.getText();
            Message createMessage = new Message(CREATE_FILE);
            createMessage.setFileName(name);
            sendMessageToServer(createMessage);     
            field4.setText(defaultText);
    2. Only use the == operator on primitives. There are very few cases in which you can properly use the == operator on objects and, in every one of those cases I have experienced, the equals(Object) method produces the same result.
    3. Name your variables more descriptively. There is really very little reason for your buttons to be named button1, button2, and so on. Give them names that mean something. For example, button1 should be named something like uploadFileButton or buttonUpload. That will give us significant information about what it is expected to do, whereas button1 does not. You may be able to remember what button1 does, but you wrote the code. I keep having to refer back to the instantiation of the button to get a hint as to what it does and, in a few months' time, so will you. :) The same goes for your labels and fields, as well.
    I'm not sure why you aren't getting the behavior you want. However, have you checked to determine that the event source of the button click is actually the button when the whole thing is inside of a JFrame? I would expect it to be, but you never know. This is why I recommend using different ActionListeners for each button. That way, you can be sure of what caused the event.
    Just my 2c. Good luck to you. :)

  • Record while holding down a JButton - is that possible?

    I'm gonna make a program that records while the user is pressing and holding down the Record button. Is that possible? How can I do it?
    I have started with this code where I am using a mouseListener for the button and not an actionListener, that´s because I think a mouseListener is better if I want to implement a function that makes it possible to hold down the button while recording. Am I right? How can I write such a method?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    import javax.sound.sampled.*;
    class Recorder extends JFrame
         private JButton recordButt = new JButton("Record");
         private Socket sock = new Socket();
         private AudioFormat audioFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 44100.0F, 16, 2, 4, 44100.0F, false);
         private AudioFileFormat fileFormat = new AudioFileFormat(AudioFileFormat.Type.WAVE, audioFormat, 16);
         private AudioInputStream ais;
         private TargetDataLine tdl;
         private File file = new File("sound.wav");
         Recorder()
              super("Recorder");
              setLayout(new BorderLayout());
              JPanel north = new JPanel();
              add(north, BorderLayout.NORTH);
              north.add(recordButt);
              recordButt.addMouseListener(new RecordButt());
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class RecordButt extends MouseAdapter
              Record r = new Record();
              public void mousePressed(MouseEvent e)
                   r.start();
              public void mouseReleased(MouseEvent ee)
                   r.interrupt();
         class Record extends Thread
              public void start()
                   DataLine.Info info = new DataLine.Info(TargetDataLine.class, audioFormat);
                   try
                        tdl = (TargetDataLine)AudioSystem.getLine(info);
                        tdl.open(audioFormat);
                   catch(LineUnavailableException err) { System.out.println(err.getMessage()); }
                   ais = new AudioInputStream(tdl);
                   try
                         AudioSystem.write(ais, AudioFileFormat.Type.AU, file);
                   catch(IOException e) {}
                   tdl.stop();
                   tdl.close();
         public static void main(String[] args)
              new Recorder();
    }

    Thanks!
    I have modified the above code and I have marked the changes with the comment "marked" and now it looks like:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    import javax.sound.sampled.*;
    class Recorder extends JFrame
         private JButton recordButt = new JButton("Record");
         private Socket sock = new Socket();
         private AudioFormat audioFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 44100.0F, 16, 2, 4, 44100.0F, false);
         private AudioFileFormat fileFormat = new AudioFileFormat(AudioFileFormat.Type.WAVE, audioFormat, 16);
         private AudioInputStream ais;
         private TargetDataLine tdl;
         private File file = new File("sound.wav");
            boolean record = false;  // changed
         Recorder()
              super("Recorder");
              setLayout(new BorderLayout());
              JPanel north = new JPanel();
              add(north, BorderLayout.NORTH);
              north.add(recordButt);
              recordButt.addMouseListener(new RecordButt());
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class RecordButt extends MouseAdapter
              Record r = new Record();
              public void mousePressed(MouseEvent e)
                          record = true;   // changed
                   r.start();
              public void mouseReleased(MouseEvent ee)
                   record = false;   // changed
         class Record extends Thread
              public void start()
                   DataLine.Info info = new DataLine.Info(TargetDataLine.class, audioFormat);
                   try
                        tdl = (TargetDataLine)AudioSystem.getLine(info);
                        tdl.open(audioFormat);
                   catch(LineUnavailableException err) { System.out.println(err.getMessage()); }
                   ais = new AudioInputStream(tdl);
                   try
                                  while(record)   // changed
                               AudioSystem.write(ais, AudioFileFormat.Type.AU, file);
                   catch(IOException e) {}
                   tdl.stop();
                   tdl.close();
         public static void main(String[] args)
              new Recorder();
    }But the Record button seems to hang while beeing pressed. Why?

  • How can I make an icon that links to a webpage that works with Mac and Windows??

    Hi!
    I burn CDs with my photos and send them to clients.   Besides the photos folder, I would like to include a file (similar to the .webloc files on the Mac Desktop) that can be clicked and it will be linked to my website - it will open up a browser window and go to my website .      Is it posssible to make one of these icons that works with both Macs and Windows machines?  Thanks!

    Now it works!  Thanks, Denico!
    The reason I saved to text:   The first time I followed your instructions, it did not work.   I tried to figure out what I did wrong and saw that you wrote to "save as plain text."   I did not know what this means and there was no option available to save a plain text.  So I looked around and saw "save as stationery" and I guessed that maybe that was what you meant.   And after that, it worked!  But the next thing you know, the icons started duplicating themselves.
    I guess I had made a different mistake in the beginning and I fixed it without knowing what it is.
    Thanks for clearing that up.
    But just one question.  WHY does saving as "stationery" make an icon duplicate itself?

  • HT201320 I have a new work email that works fine on my iPhone 5. However the tone and vibration do not work on my phone or iPad for this particular account? It is like it is on silent!! All the features are on for tone / vibration and nothing happens!!!

    I have a web based new work email account from my Company that is working fairly well on my iPhone 5 and my iPad 4. However no matter what I do in the settings every email that comes in to both device comes in silent with no tone or vibration. Both devices are working fine and my other personal accounts are also working fine with Tones and Vibrations. I do not understand what is going on. I am on a loud Construction site all day and I need to have that working well. Can you help me out?

    ps when syncing it jumps through steps 1 - 4 real fast, i seem to remeber iphone showing the number of tracks transferring and names, but i see nothing? then it sits on 5 saying "waiting for changes to be applied"

  • A UPS model that works with Mac Native software to do a graceful shutdown and automatic restart during a power failure.

    I've tried 3 UPS's (2 APC and one TripLite) that state they are OSX compatible, however, they do not fully respond to the native osx setting in (system Preferences/ Energy Saver/ UPS/Start up automatically after a power failure). This is what happens:
    During a power outage, the OS does a graceful shutdown, but does not reboot when power is restored. 
    Apparently, the UPS is not notified to turn off during the shut down process. The power (on-Off-On) cycle is required by the mac to restart.
    Trip lite tech support says they have software that works with Windows and linux to do this, but not mac.
    I've tried two older APC UPS's, One Smart UPS1500 and a Back-UPS 1500 with the same result on two different servers and one iMac.
    At this point I'm looking for a make and model of a UPS that does work. If anyone can verify a make and model that actually does this, I'd greatly appreciate it.
    Its a simple test, just pull the plug on your UPS, wait for the system to shut down, and then plug the UPS back in. The system should reboot.

    Many of the CyberPower UPS units are compatible. Checkout the home solutions on this page: http://www.cyberpowersystems.com/products/ups-systems.html

  • Lightroom 3 Error Working With Photos That Work With Other Apps

    My Setup:
    Lightroom 3.3 for Mac
    iMac OS X 10.6.6
    The problem:
    Lightroom is unable to work with photos it used to be able to work with. In the Library Module I get the error message "There was an error working with the photo." In the Develop Module I get the message "The file appears to be unsupported or damaged."
    Now I know the photos are ok because I can view them in other apps including Photoshop CS5
    And these photos used to work in Lightroom.
    I am suspicious it has something to do with Picasa, which I use to catalog faces. I have compared the exif data and the photos that don't work have an extra value called "Image Unique Id" and it appears to be a long hexadecimal number.  Also, the software version has been modified to indicate "Picasa".
    It bothers me that a world class product like LIghtroom is not robust enough to work on these files when everything else I have tried does work.  The problem is LIghtroom is the primary tool in my workflow.
    So has anybody seen this and know of a way to fix it?

    @Pete -
    Thanks for the feedback, but my I think my concern is valid.  Whatever Picasa is doing to the photo other apps like Apple Preview and CS5 can deal with it.  Lightroom cannot.  I am not explicitly modifying the files in Picasa just using Picasa to catalogue the faces.  So yes, I will quit using Picasa, but I still have hundreds (if not thousands) of photos that can no longer be processed by Lightroom and I need guidance on how to best recover these photos.
    I didn't know whether the Image Unique Id is standard or not, but I do know it does not show up in the files that work, only in the files that do not work.  I just assumed that it was non-standard because I did not see it on functioning files.
    Also, I would argue that Lightroom should be better able to handle this kind of situation instead of just not working.  Thanks again.

  • My ipod won't show up on my computer. I have another ipod touch, that works fine. What should I do? Do I need a different ipo usb cord for the nano?

    my ipod won't show up on my computer. I have another ipod touch, that works fine. What should I do? Do I need a different ipo usb cord for the nano?

    iTunes never displays the iPod in the left pane?
    iTunes is shipped with a "helper application" called the "iPod Service" that runs and is used by iTunes to communicate with the iPod device. This service may be disabled.
    If your system is Microsoft Windows XP and you are logged in as an Administrator:
    1. Quit iTunes and, if your iPod is currently connected to your computer, safely remove it using the system tray application to manage removable devices.
    2. Right click on "My Computer"
    3. Select "Manage"
    4. In the "Computer Management" window, left pane (tree view), follow this path:
    +Computer Management (local) > Services and Applications > Services+.
    5. In the right pane, scroll down to "iPod Service" and double click it.
    6. If the service is listed as "Disabled" and "Stopped," change to "Manual" and "Start" it. ("Manual" will cause it to start when iTunes starts and "Start" starts the service right now.)
    7. Close "Computer Management"
    8. Restart iTunes and wait for it to completely come up.
    9. Reconnect your iPod.
    Does your iPod show up in iTunes?

  • Mid 2011 Macbook Air - Yosemite keyboard and trackpad stopped working, the only button that worked was the power button, only one USB port works.

    I have a Mid 2011 Macbook Air.
    Upgraded to Yosemite last week.
    Three days ago I was using my Macbook Air for the first time since upgrading to Yosemite. I had been using my Macbook Air for approximately 30 minutes, I was using safari and the keyboard and trackpad stopped working (would not respond). The only button that worked was the power button.
    I rebooted and they were still not working. I plugged in a USB mouse and external USB keyboard, only one USB port would work (the Left USB port if looking at the screen) so I had to swap between keyboard and mouse.
    After logging in there is a bluetooth icon at the top of the screen with a sawtooth line through it. Bluetooth is unavailable and the bluetooth icon is missing from the system preferences menu.
    If I run a hardware test by holding D (on USB keyboard) at startup it says that no problems are found and at the conclusion of the test the keyboard and trackpad start working again. When I log on the bluetooth is working again.
    I shut down the Macbook Air and when I started it again the keyboard and trackpad and right side USB ports were all not working again. I logged in using the USB keyboard and mouse and the bluetooth not available sawtooth icon had returned.
    I ran the hardware test again and at the conclusion of the test the trackpad and keyboard started working again.
    I have tried deleting com.apple.Bluetooth.plist and com.apple.Bluetooth.plist.lockfile from /Library/Preferences/ and tried resetting SMC and Power Functions but this did not fix the issue. The only thing that seems to work is running a hardware test - obviously I don't want to do this every time I use the computer.
    I do not believe any hardware is faulty/damaged - I think it has something to do with bluetooth/Yosemite.
    I do not have the Macbook with me at the moment, if you have suggestions that I can try or additional checks/info you require please let me know and I can get back to you.
    Thanks,
    John

    Hi!
    I have exactly the same problem, and I can't find any solution.
    I can't even track down the root of the problem: the Bluetooth/Wifi module? The trackpad? The keyboard/top case? The logicboard?
    I've tried all the usual: SMC/PRAM reset, clean install, kext cache clearing.
    Any suggestion is greatly appreciated!

  • My ipod touch 4g isnt letting me download apps now whenever i try to it says cannot connect to itunes, i cant find anything that works, i logged out of my apple account and tried to log back in but it wont let me! Can anyone help me

    My ipod touch 4g isnt letting me download apps now whenever i try to it says cannot connect to itunes, i cant find anything that works, i logged out of my apple account and tried to log back in but it wont let me! Can anyone help me

    Likely Apple problem
    iTunes Store - 20% of users are affected
    Users are unable to make purchases.
    http://www.apple.com/support/systemstatus/

  • Sync metadata to multiple files - how does that work?

    Frustrating.  In Library Module of LR4.4 under Vista 32, I have corrected a "Capture Time" of a single jpg Photo via the "Edit Capture Time" dialog.  The new date correctly shows up in the "Date Time Original" EXIF field of the Metadata panel on the right.
    Now, I want to sync that date to other jpgs which all come with incorrect "Date Time Original" - so, I highlight the above photo, mark the other ones to less light grey, press "Sync Metadata".  THe dialog of  "Sync Metadata" appears, showing the new date under "ICPT image" as "date created" - so far so good.  I mark that field, and press the ok button and the sync runs.  After that, no change is shown to the respective field of any of the photos metadata fields to be sync'd, no sync has actually happened, and even the "Save Metadata to file" command does cure this situation.
    Using the command with a single target file instead of multiple ones does not help either.
    What does help?
    Why can't I update a set of superold pictures to their correct "date created" date via Metadata sync? This Metadata sync does not sync.
    thanks for comments
    Gerd
    Message was edited by: gerdh - clarification

    Well, of course, one can always take the escape route to software that works. - 
    However, IF Adobe advertises "Metadata sync" in a software licensed for money, THEN this function should work. Am I right or am I right?
    I found, that particularly the one single Metadata field "Capture time" can be set for a multitude of images (selected before using this command from the pulldown menue) - which helped for my problem.  But what about other Metadata fields, if the "Sync Metadata" function does not work as intended?  No word in the documentation such as "there is a function "Sync Metadata" but please do not expect ANY function at all when using it".
    Using a freeware such as ExifMeta to get arund a "non-function" is not the purpose of using a software such as Lightroom - please understand.
    Gerd

  • I am trying to connect to my Wifi Network. It is a Galaxy Nexus. I am trying to connect to this Hotspot. I have an iMac that works fine with my network but for some reason with this computer I cannot connect.

    So far I have pulled the system configuration file, I have reset safari, I deleted all old passwords from the wifi network in Keychain I restarted both devices. I am at the end here and I cannot get it to work I have an iMac that works fine with my network but for some reason this computer will not connect. It is system wide specifically to my personal hotspot. I can connect fine to any other network (wifi) but just not mine. I have not changed any wifi settings. I have been trying to figure this out. I have a MacBook Pro Late 2006 model running Lion (10.7.5) So any ideas anyone? Please help!

    12. At a WiFi hotspot, you can't get connected.  The most frequent reason is the login screen for the WiFi hotspot is only able to be connected with a single type of browser.  If Safari doesn't work, try Firefox, Chrome, Omniweb, or Opera. 
    From my tip:
    https://discussions.apple.com/docs/DOC-6411

  • Script that worked in CS does not work in CS4 - multiple open page, print , pdf export and close

    I had a script that worked great for me in Indesign CS. But now does not work in CS4. Anyone knows what needs to be done to make it work again ?
    When I drop folder with indesign files on top of this script:
    1. opens first page
    2. turns specific layer on
    3. prints using preset
    4. exports using preset
    5. close without saving
    6. next page
    Anyone who can give me solution or idea how this should work is greatly appreciated.
    on open sourceFolders
    repeat with sourceFolder in sourceFolders
    tell application "Finder"
    try
    -- If you would like to include subfolders, you say - every file of entire contents of folder…
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias list
    on error -- work around bug if there is only one file
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias as list
    end try
    end tell
    if idFiles is not {} then
    tell application "Adobe InDesign CS4"
    set user interaction level to never interact
    repeat with i from 1 to count of idFiles
    open item i of idFiles
    tell document 1
    try
    set visible of layer "ImagesTag_Layer" to true
    end try
    set myPreset to "letter size" -- name of print style to use
    with timeout of 700 seconds
    print using myPreset without print dialog
    end timeout
    set myPreset1 to "pdf preset name" -- name of pdf export style to use
    set myName to the name -- name includes .indd should remove at some point          
    with timeout of 700 seconds
    export format PDF type to "users:temp:Desktop:pdf:" & myName & ".pdf" using myPreset1 without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
    end timeout
    close without saving
    end tell
    end repeat
    set user interaction level to interact with all
    end tell
    end if
    return 10 -- try again in 10 seconds
    end repeat
    end open

    (Disclaimer: me not an AS guy!)
    First thing I noticed is the interaction level is set off. If you comment out this line
    set user interaction level to never interact
    you might be able to pinpoint the exact error -- ID will display a standard "failed" dialog, hopefully showing the line that it fails on.
    A quick question: the script assumes two presets in your InDesign: one for print ("letter size") and one for PDFs ("pdf preset name"):
    set myPreset to "letter size" -- name of print style to use
    set myPreset1 to "pdf preset name" -- name of pdf export style to use 
    Do these actually exist in your CS4, with the same (non)capitalization and spaces?

  • Does anyone know if it is possible to change the display in week view to show 24 hours per day for those of us that work irregular hours

    Does anyone know if it is possible to change the display in week view to show all 24 hours per day for those of us that work irregular hours.
    Also is it possible to have all of the 'all day' entries showing, not just 3.5 of them.
    The app Week Cal HD was the perfect calendar until Apple removed it so could they please offer the same facilities that it offered.

    Does anyone know if it is possible to change the display in week view to show all 24 hours per day for those of us that work irregular hours.
    Also is it possible to have all of the 'all day' entries showing, not just 3.5 of them.
    The app Week Cal HD was the perfect calendar until Apple removed it so could they please offer the same facilities that it offered.

  • I just upgraded to os 10.9.5. When I try to open iPhoto, I am told that the version I have(9.3), is not compatible with the os. But it came with it when I upgraded. What do I have to do to get an iPhoto that works with 10.9.5? TIA

    I just upgraded to os 10.9.5 on my 15 " macbook pro from os 10.7.5. When I try to open iPhoto, I get the message that it is not compatible with the os. How can that be??? It came with the upgrade. It says the version of iPhoto is 9.3. How do I get an iPhoto that works with os 10.9.5? TIA

    This screenshot shows which previous versions of iPhoto are compatible with Mavericks.  It also indicates which versions qualify for a free upgradeto iPhoto 9.5.1 and which require a purchase:
    Note 1:  every day more users are reporting problems with iPhoto 8.1.2 so I've included it in the non compatible category.
    Note 2:  If your previous version of iPhoto was iPhoto 7 (08) or earlier you'll need to download and run the iPhoto Library Upgrader 1.1 application on the library before opening it with iPhoto 9.5.1

Maybe you are looking for