Address Book Program freezes

I can't run the program Address Book. Is there a way to uninstall and reinstall it? or run a repair?
Thanks!

I have the same problem since the update to qo.5.5 and it seems to be related to Smart Groups. I used to use the Address Book in Skype and Eudora. After the upgrade to 10.5.5 Eudora went into an infinte loop. After using a "virgin" version of it and use it in my usual waxy WITHOUT checking the box for MAc OS X Adress Book, Eudora worked. But still Address Book didn't, but only under the following circumstances: As long as only "normal" groups are presented it works. As soon as I try to scroll down so that the very first smart group should become visible it wents into an infinte loop. I am unable to back-up the exisitng archive. I have tried a lot to change this: I had a backup BEFORE the upgrade of the data base. It doesn't work. I used earlier back-uped version of the data base. It doesn't work. I deleted in the Metadate file the Smart Group specifications: As soon as I start Address Book, they are recreated! And the same error occurs. I can export to create vcards. I can send emails from within Address Book. But as soon as Smart Groups are involved it doens't work any linger.
I alos tried immieditaely the advice of Mulder: It doens't change the behviour of Address Book.
Is there an other advice?
thomas

Similar Messages

  • Address Book Programming Guide Help

    Im new to xcode and Im just stating with using the address book programming using Apple's Quick Start Tutorial http://developer.apple.com/library/ios/#DOCUMENTATION/ContactData/Conceptual/Add ressBookProgrammingGuideforiPhone/Chapters/QuickStart.html
    and ended up with these two problems in ViewController.m and I hope somone one could please help me. Thank you.
    My ViewController.m is

    xnav wrote:
    That creates more errors
    I'm not surprised.
    Did you code a showPicker method?
    Do you meet this criteria from the Tutorial's Introduction?
    To get the most out of this document, you should already understand navigation controllers and view controllers, and understand delegation and protocols.
    Message was edited by: xnav
    I may have missed that.

  • HT2486 this address books keeps freezing and closing unexpectedly. why?

    My address book keeps freezing and closing. Just upgraded my operating system and then this started.

    Apply the two fixes below in order as needed:
    Fix #1
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    iPhoto 8 (09) and earlier- run the options indicated
    iPhoto 9 (11) and later- run  Option #4 to rebuild the database
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager (iPhoto 8 or earlier or IPhoto 11 and later) and launch.
    2 - click on the Add Library button and select the library you want to add in the selection window..
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the
    File ➙ Rebuild Library (iPhoto 8 or earlier)
    or
    Library ➙ Rebuild Library (iPhoto 9 or later)
    menu option to rebuild the library.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • Address Book Application Freezes

    While using the address book application it froze up, I did a forced boot. When I reopened the Address Book application again it freezes up while opening.
    How can I delete the Address book application and reload it?
    I luckily have all my contacts backed up on my iphone.

    I have the same problem since the update to qo.5.5 and it seems to be related to Smart Groups. I used to use the Address Book in Skype and Eudora. After the upgrade to 10.5.5 Eudora went into an infinte loop. After using a "virgin" version of it and use it in my usual waxy WITHOUT checking the box for MAc OS X Adress Book, Eudora worked. But still Address Book didn't, but only under the following circumstances: As long as only "normal" groups are presented it works. As soon as I try to scroll down so that the very first smart group should become visible it wents into an infinte loop. I am unable to back-up the exisitng archive. I have tried a lot to change this: I had a backup BEFORE the upgrade of the data base. It doesn't work. I used earlier back-uped version of the data base. It doesn't work. I deleted in the Metadate file the Smart Group specifications: As soon as I start Address Book, they are recreated! And the same error occurs. I can export to create vcards. I can send emails from within Address Book. But as soon as Smart Groups are involved it doens't work any linger.
    I alos tried immieditaely the advice of Mulder: It doens't change the behviour of Address Book.
    Is there an other advice?
    thomas

  • In iPhoto making a book, program freezes

    Program keeps freezing (spinning ball) each time I type in photo captions.
    I must "Force Quit" and try again. This has happened a dozen times in the last hour.
    iPhoto 9.5.1
    OS X 10.9.5
    Using iPhoto - Folio Template
    Any suggestions?
    Thank you!

    If repairing the database doesn't  fix the problem as a test launch iPhoto with the Option key held down and create a new, test library.  Import some photos and test to see if the same problem persists. Does it?
    If you get the same problem with the new library it could be a damaged preference pane. In that case do the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder: User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try again.
    NOTE: For Mavericks and Yosemite,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • Address Book Freezes

    I have a new iMac. My wife recently created a new smart mailbox into which she added multiple addresses. Since then we have had limited function with Address Book. Adding an address or using one for email causes the program to freeze requiring near constant usage of the "Force Quit" function. When the Ad Book is opened with Mail it too freezes requiring "Force Quit". Without the Ad Book the email works well.
    Does anyone know the cause and, if so, could you post a solution. Thank you

    Welcome to the discussions, aeraz.
    Please explain more clearly "created a new smart mailbox into which she added multiple addresses".
    Does this mean: in the Mail program there is a smart mailbox, with multiple parameters such as "any recipient contains [email protected]" or in the Address Book program there is a smart group
    with multiple parameters such as "card contains aeraz".
    In either case, have you tried deleting the smart box or group?
    AK
    AK,
    Thank you for your reply. It was nice to wake up and not feel isolated with a problem that reminds me, excuse the comparison, of Windows. In answer to your questions:
    1. I was referring to a group.
    2. The application freezes whether it is launched by itself or through another application (i.e. Mail).
    3. Any application used in conjonction with address book freezes
    4. Any attempt to remove the group provoked a freeze. This has led me to believe (perhaps erroneously) that the creation of this group could be the source of the problem. Why?
    Thank you
    iMac 24"   Mac OS X (10.4.8)  

  • Address book freeze on merge duplicates

    When I merge duplicates in Lion Address Book it freezes. I can leave it for 24 hours and it's still frozen again and again. How do I fix this?

    I was also having the same problem (frozen app, right pane unresponsive to selections in the left pane, unable to search) but trashing the database in Library > Application Support > AddressBook did not work for me, so I called Apple Support. They asked if I was syncing with iCloud (yes, I was) and had me 1) export the address book database as a backup (File > Export > Address Book Archive), then 2) open System Preferences > iCloud, then uncheck the Contacts (a dialogue box will appear - click on delete) and leave it unchecked for 15-20 seconds, then recheck the contacts and wait about 30 seconds (for the db to repopulate). Now my AB is happy! Hope this works for you. PB

  • Address Book freezes hangs locks up every time on quit

    Every time I quit out of Address Book it freezes (locksup hangs).
    I have tried exporting my data, deleting the database and other files from my user library, deleting preferences for the Address Book and then reimporting but that has not helped.
    Ideas?
    MacOS10.4.11 PowerBookG4 15" all up to date

    At this point I think you should get Applejack...
    http://www.versiontracker.com/dyn/moreinfo/macosx/19596
    After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
    applejack AUTO
    Then let it do all 5 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 5 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.

  • Address Book Not Working, Tried to Restore still Not Working

    My address book isn't working. You can see what it does by clicking the link to the screenshot below. All menus are grayed out. and when i go into preferences It freeze's then I have to Force Quit. Thankfully I have Back up files of my address book. But even restoring them doesn't fix the problem. I'm thinking the actually Address Book program is messed up. What should I do???
    http://www.squadxp.com/news/book.jpeg

    K Rock XP,
    You may want to try the plist replacement one more time. Make sure that you use the restart option.
    Replacing individual OS X applications is rarely productive in correcting application problems. Unless there is some reason to suspect that you have adversely affected the installation, for now you will be better off pursuing another course of action. Can you correlate the appearance/lack of function with any other event?
    If you create another user account, can you duplicate the behavior of Address Book in that new account?
    If Address Book functions in another account it indicates that it is not a system wide problem, and you may benefit from following the troubleshooting procedures listed in Resolving Disk, Permission, and Cache Corruption, by Dr. Smoke. Once again, let us know what happens.
    ;~)

  • Address Book -- Will this bug EVER be fixed?

    I just spent half an hour trying to figure out why my Address Book was completely freezing, even though restarting the machine. I would start the app, and it would be completely unresponsive.
    So, I googled and found a thread (http://discussions.apple.com/message.jspa?messageID=8106287#8106287) from right after the release of 10.5.5, saying that if you create a smart group with a conditional using "card is not in XXX group" or "card is not in any group" the application will be completely and permanently hosed until you delete those groups (without starting AB, since you can't). Instructions are above if you're having that problem but READ THE WHOLE THREAD. I did, removed the offending group, and everything works again.
    Now we're up to 10.5.7 and Apple hasn't (as usual) done a **** thing. I mean, they could at least remove the option, or change it to read "make application completely unresponsive."
    This is just one of a LONG series of unfixed/unacknowledged serious bugs, or staggering deficiencies, in the Apple application suite. Address Book doesn't even have a provide-feedback link so I guess they really don't care. Does this mean they're going to stop supporting the product, or what?

    Sorry to hear you are having a problem with your Address Book program. It's a pretty stable program, and I'm not having the problem with my Mac's that you have encountered.
    Apple's support page for Address Book is:
    http://www.apple.com/support/leopard/addressbook/
    To report a bug or feature request for a program that is not on any other list, you go to: http://www.apple.com/feedback/macosx.html and choose Applications/Utilities in the *Feedback Area* drop-down menu.
    Every OS has bugs, that's why we are now at 10.5.7, and deficiencies in a generic program are not rare. Almost every program provided by Apple has commercial alternatives, some are excellent. I don't think anyone actually believes that every Apple program is the best in the world, they are just the best overall suite and all have room for improvement.
    I suspect you are a victim of accumulated corruption in either your OS or User account. There are many steps that can be used to test for this, but they do take more than a half hour and may require rebuilding databases, erasing preferences, reinstalling softwares, etc.
    Rarely does an upgrade fix an existing problem.

  • Address book .... importing text file

    I am designing an address book which opens a text file called AddressBook.txt which reads in the information in the following format:
    lastname,firstname,street,city,state,zip,phonenumber,birthday,persontype
    lastname2,firstname2,street2,city2,state2,zip2,phonenumber2,birthday2,persontype2
    etc. (with a maximum entries of 500)
    I am having a problem reading in the information without the commas and wrapping to the next line. I can either use the BufferedReader or Scanner to input the file and as you can see below, my code is not complete yet. I can't figure out how to code the storeAddress() method in order to get the addressBookEntries[] to include the necessary information for outputting, sorting, etc. If I can get the information read into the addressBookEntries[], I think I will probably be able to proceed in the rest of the required tasks (i.e. sorting by last name, searching by last name, etc.)
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] =
            new AddressBookEntry[MAX_ADDRESS_ENTRIES];
        String FILE_NAME="AddressBook.txt";
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public void storeAddress(File addressFile){
         Scanner sc=null;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    try {
    // Delimiters specifiy where to parse tokens in a scanner
    sc = new Scanner(addressFile).useDelimiter("\\s*[\\p{,}*\\s+]\\s*");
    catch (FileNotFoundException fnfe) {
         JOptionPane.showMessageDialog(this,"Could not open the file");
    System.exit(-1);
    for(int i=0; i<MAX_ADDRESS_ENTRIES; i++){
         while (sc.hasNext()) {
    lname=(sc.next());
         if (!lname.equals("")){
         addressBookEntries[i].setLName()=lname;
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private Date bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public String toString() {
    return lastName+" "+firstName;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public Date getBday(){
    return bday;
    public void setBday(Date newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public class extPerson extends Person{
    //new clss People
    public class People {
         int MAX_PEOPLE=500;
         BufferedReader bf;
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group[i]+"\n");
              return sb.toString();
    public void read(){
              String str;
              try {
              bf=new BufferedReader(new FileReader(new File(FILE_NAME)));
              str=bf.readLine();
              while (str!=null) {
              insert(str);
                   str=bf.readLine();
         catch (IOException e) {
              // Will jump to here on an eof condition.
         try {
              bf.close();
         catch (IOException e) {}
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public People() {
              group=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              //extPerson guy=new extPerson(data);
              //group[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
         public void clear() {
              // This loop frees up the memory used by each extPerson
              for (int i=0; i<nPeople; i++)
              group[i]=null;
              nPeople=0;
    extPerson group[];
    int nPeople;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();

    Ok, I have changed my code to reflect your suggested changes, but I'm still unsure how to use the findInLine you suggested.... This is all very new to me and I've been looking on the java website for suggestions, but I'm still stumped on how to pull this together. I'm unsure on how to set the lastname,firstname,etc. for retrieval...
    Here's my code:
    //ADDRESS BOOK
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] = new
        AddressBookEntry[MAX_ADDRESS_ENTRIES];
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    //PERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private String bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public void parseString(String s) {
              try {
              lastName = s.substring(0,s.indexOf(","));
              firstName = s.substring(s.indexOf(",")+1);
    address = s.substring(s.indexOf(",")+2);
    city = s.substring(s.indexOf(",")+3);
    state = s.substring(s.indexOf(",")+4);
    zipcode = s.substring(s.indexOf(",")+5);
    homephone = s.substring(s.indexOf(",")+6);
    extPersonType = s.substring(s.indexOf(",")+7);
    bday = s.substring(s.indexOf(",")+8);
    catch(StringIndexOutOfBoundsException sbe) {
              JOptionPane.showMessageDialog(null,"Error " +
    "in Person: Could not parse the line "+s);
    public String toString() {
    return lastName+","+firstName+","+address+","+city+","+
    state+","+zipcode+","+homephone+","+bday+","+extPersonType;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public String getBday(){
    return bday;
    public void setBday(String newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public Person(String data) {
    parseString(data);
    //EXTPERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    //new clss extPerson
    public class extPerson extends Person {       
         int MAX_PEOPLE=500;
         BufferedReader bf;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    String FILE_NAME="AddressBook.txt";
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group1[i]+"\n");
              return sb.toString();
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group1[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public extPerson() {
              group1=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              Person guy = new Person(data);
              group1[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
    Person group1[];
    int nPeople;

  • Export address book group text file?

    Hi,
    I need to get a group of addresses to a friend who can not use the vcard format. I need to do it in a text file format, but don't see any way in address book to do that.
    Can you help?
    Meg

    The vcards are actually text files - you can read them with BBEdit or Text Editor.
    One way to achieve what you want is clumsy but may be workable, depending on the number in the group and what your friend plans to do with them. In Address Book, select the group and go to File/Print. Choose the List style, select the fields to be included and then click the PDF button and save the group as a PDF. Send the PDF to your friend. Friend can open it, click the "Select Text" tool, select the data and copy it off to whatever is to receive it.
    Another more standard way would be to run applescript to pull the data you need into a comma-separated or tab-separated data file which can be imported into spreadsheet or address book programs. Several versions of such scripts have been posted here recently, or there are various importer/exporter scripts available on the internet.
    AK

  • Importing Addresses in Address book from text file

    Hello all,
    I am attempting to import my address books from Microsoft Outlook into the Address book on the Macintosh.
    More specifically, I have several distribution lists under Outlook that I use to send out various newsletters from where I work. These distribution lists have addresses that are specifically NOT within my Contacts under Outlook.
    So far, I HAVE been able to get the 400 email addresses exported into a plain text file. This text file has only the email addresses, one per line within the text document.
    The problem I have been having is finding some way to make this information "useful" for the address book program. Attempting to import the text file doesn't work (understandably, since I assume the program will only see the text document as "one" card.)
    So my question is, how can I import these 400 addresses into the address book under a specific grouping or distribution list? Is there some way I can create individual vcards for EACH of these addresses, THEN import them?
    Or am I doing things all wrong from the get-go, and need to attempt something else?
    Here' hoping you can help!!
    Thanks

    Here's instructions. I find it hard to believe that this much work is required, but I'm not at home and so I can't experiment with my Mac.
    <http://www.macosxhints.com/article.php?story=20050828200319417&lsrc=osxh>
    I was thinking that you might just want to drag contacts from Outlook to a folder in Windows -- all the contacts get exported to individual "cards" which I'm pretty sure you can import directly into Address Book.
    As for your distribution lists -- I wouldn't be surprised if Mac OS requires everyone on the list to appear in Address Book. If you try creating a list manually, can you include recipients that don't go in Address Book?

  • Contacts on phone not showing in address book

    this past weekend all of a sudden my contacts stop appearing in my address book. however when i went to the spotlight search and searched for one they appeared and in the phone and text recent conacts they appear
    i re-synced my address book and now only those contacts appear in the address book, none of the contacts i created on the phone have ever synced back to my computer too BTW,
    so now when i search for a person some people are in there twice,
    i need some help

    i am using a macbook and using the address book program with the OS
    i ended up buying PhoneView and just getting the missing contacts off the phone then resyncing the phone and replacing all the contacts
    they are all in my phone twice under the search for some reason but i am not really caring at this point cause i have them all back where they belong
    i could use some help in trying to get rid of the doubles in spotlight
    and some insight into what the **** happened

  • Restoring Address Book - help!!

    Yesterday I upgraded my Dual 1.8 G5 to Tiger from Panther. I took my Mac HD and copied the drive to an external, then reformmated the internal and installed the new OS.
    So far everything is fine, except my Address Book. I did not specifically make a backup in the Address Book program, like i said above, i simply copied over my entire drive contents to another drive for backup. So obviously the new A. Book is empty (except for the personal card and Apple) and i cant find a way to get my old addies back. Of course I see that option under File or whatever but since I didnt not make a backup IN Address Book.. am i screwed? Most programs have a text file or some sort of file i can import, but i cant find it for this... any help, please?? thanks!!!
    dual 1.8 G5   Mac OS X (10.4.6)  

    If you backed up these folders & files, just replace them on your new system with your backups:
    ~(YourHome)/Library/Application Support/AddressBook (copy the whole folder)
    ~(YourHome)/Library/Preferences/AddressBookMe.plist, com.apple.AddressBook.abd.plist, com.apple.AddressBook.plist
    Then relaunch AddressBook.
    -mj
    [email protected]

Maybe you are looking for

  • Extracting a .zxp file for Adobe add-on for Photoshop  .

    I bought and downloaded the 8Watercolor and Acrylic Painting FX add-on for Photoshop but receive an error "The installed file is invalid. The extension will not be installed."  Any idea on how to correct this?

  • This Disk Could Not Be Mounted

    Hello, i've looked throughout the message boards but I wasn't able to find anything that would help with my problem. I have a Lacie hardrive plugged in to my Macbook Pro. It's a 1.5TB hardrive with 2 partitions, and the other day it crashed. Nothing

  • Customer- credit Card Issue on Sales Order

    Hi Experts, There is an issue,where an incorrect Credit Card details are showing up during an order creation for a Customer. In XD02, the payment card details shows it as Master Card. But while creating order(VA01),it showing VISA card. Can anyone ex

  • How do I save a "bash" script? (in attempt to fix one of my other problems)

    Here is my original problem: http://discussions.apple.com/thread.jspa?threadID=2195627&tstart=0 I came across this that sounds like it will help my issue: http://www.macosxhints.com/article.php?story=20090316190817357 However, what am I supposed to d

  • WebLogic Form-based security

    I am using form-based login to authenticate users. I want to tie all entry points on successful login to a single page. Is there a way to accomplish this? In the web.xml one can configure the error page to be forwarded to on login failure but there i