Closing a frame

I have created a frame (frame1) with a 'Continue' button for the user to select. When the user selects this button, I want another frame to be called up (public void Continue2Display() ) as well as closing the frame (frame1).
I added frame1.dispose to the actionlistener but it doesn't work.
Here is part of my code. Can anyone help me fix it?
frame1.add(Continue1);
                    Continue1.addActionListener(new ActionListener(){
                         public final void actionPerformed(ActionEvent e){
                              if(e.getSource()==Continue1){
                                        frame1.dispose();
                                        Continue1Display();
The error is
java:151: local variable frame1 is accessed from within inner class; needs to be declared final
                                        frame1.dispose();
I'm not sure where I am going wrong!!
Thank-you

I tried frame1.setVisible(false); but it didn't work.
I can't understand why this won't work...I keep getting the same error stating frame1 needs to be declared final.
public static void main(String args[])
          JFrame frame1 = new OScreen();
          public OScreen()
                    // Creating a frame and setting the size along with the background colour
                    Frame frame1 = new Frame("Welcome to my opening screen");
                    frame1.setSize(1025,740);
                    frame1.setBackground(Color.blue);
                    // Displaying and adding an image to a button
                    ImageIcon icon = new ImageIcon("cs_title.gif");          
                    JButton button = new JButton(icon);
                    // Creating labels for text
                    JLabel labelspace1 = new JLabel(" ");
JLabel labela = new JLabel(" Software Engineering Project ",SwingConstants.LEFT);
                    JLabel labelb = new JLabel(" 2001 / 2002 ",SwingConstants.LEFT);
                    JLabel labelspace2 = new JLabel(" ");
                    JLabel labelc = new JLabel(" Project Title : ",SwingConstants.LEFT);
                    JLabel labeld = new JLabel(" An LU Decomposition Demonstrator ",SwingConstants.LEFT);
// Creating three panels and setting the color for the background
               Panel p = new Panel();
                    p.setBackground(Color.blue);
                    Panel q = new Panel();
                    q.setBackground(Color.blue);
                    Panel r = new Panel();
                    r.setBackground(Color.blue);          
     Font writing = new Font("SansSerif",Font.BOLD, 18);
                    Continue1.setForeground(Color.red);
                    Continue1.setFont(writing);
                    // Adding a button to a panel
                    p.add(button);
                    // Adding labels to a panel as well as setting the size and colour
                    q.add(labelspace1);
                    labela.setFont(new Font("Sansserif",Font.BOLD,50));
                    labela.setForeground(Color.green);
                    q.add(labela);
                    labelb.setFont(new Font("Sansserif",Font.BOLD,50));
                    labelb.setForeground(Color.yellow);
                    q.add(labelb);
                    q.add(labelspace2);
                    labelc.setFont(new Font("Sansserif",Font.BOLD,50));
                    labelc.setForeground(Color.green);
                    q.add(labelc);
                    labeld.setFont(new Font("Sansserif",Font.BOLD,50));
                    labeld.setForeground(Color.yellow);
                    q.add(labeld);
                    q.add(labelspace3);
                    labele.setFont(new Font("Sansserif",Font.BOLD,50));
                    labele.setForeground(Color.green);
                    q.add(labele);
                    labelf.setFont(new Font("Sansserif",Font.BOLD,50));
                    labelf.setForeground(Color.yellow);
                    q.add(labelf);
                    frame1.add(Continue1);
                    Continue1.addActionListener(new ActionListener(){
                         public void actionPerformed(ActionEvent e){
                              if(e.getSource()==Continue1){
                                        frame1.dispose();
                                        Continue1Display();
                    // Adding the three panels to the frame
                    frame1.add("North",p);
                    frame1.add("Center",q);
                    frame1.add("South",r);
                    // Displaying the frame
                    frame1.setVisible(true);
I would be really grateful if anyone can help me fix this program.
Alison

Similar Messages

  • Open Published Project with Closed Search Frame

    Hi there,
    I'm using RH 8 and generating Webhelp Pro.  I have turned off the navigation pane and have created my own TOC.  I created my own window for RH to open in and I only want to use the search feature.  What I'm trying to do is when I open RH in IE, Firefox, or other browsers I want the search frame to be closed and only open when the user clicks the search button.  I'm assuming it is in the JavaScript somewhere but JavaScript is not my strong suit and I would struggle to find the reference to the code.  I have displayed a couple of pictures of what I'm trying to do.
    This is how it opens right now.
    This is how I would like it to open.
    Any help would be greatly appreciated.
    Thank You,
    Ian

    Hey Nick
    Thanks
    I had no idea that the FCP on the new I mac was not in the application folder. So I checked it out, and sure enough it was only on the desktop. So I dragged it to the applications folder and checked for updates. After updating and restarting the Mac, wala Im good to go.
    Jesk!
    That was simple hard.
    Thanks for helping me finnally get it.

  • Closing the Frame

    If I write an applet, which create a frame, and the menu in the frame. the frame contain a "new" command which to create another frame, and also has a "quit" command in the menu. If I have the "quit" command response like that when it click I want all of the opening frames will be closing then what should I do? I tried to use the System.exit(0); but it will generate the security error message, then what should I do, please give me the advise

    have you tried to make the dispose of the frames? The hide method just hides the frame. The dispose method closes the frame.

  • How to renable a closed Internal frame?

    Hi Friends,
    I got few intenal frames which can be closed at any point. I dont loose the Jinternalframe Object though. Can I again show the internal frame even if some closes the the internal frame window. Please let me know how ? I will be glad.
    Regards,
    Ravi.

    rather than actually closing the JInternalFrames, use setVisible(false) on a frame to hide it from the user. If you want to bring the window back simply call setVisible(true) on the frame you want to reinstate. You can override the default window closing behaviour to do this fairly easily.

  • Opening and closing a frame from an applet security problem

    can I open a frame or a window from an applet and close the frame by using
    System.exit(0) for the frame or will it throw a security problem.

    I am using system.exit(0) to exit the JVM.
    dispose()
    Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children. That is, the resources for these Components will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.
    If this frame have to be close and open again don't use dispose.
    there is no check whether a frame is active? what you can do is set the the new frame to null (frame = null) and also when you dispose it, this will let you know if the frame is active or not.
    Noah

  • How set ctrl +a event for Jbutton and esc event for closing jinternal frame

    i am doing desktop project in that i need set ctrl event for button ,i am strucking in that area pls anybody help me to overcome this problem ,and also i need button in table when i press button it has to fill value in the next field ,its urgent please

    Read the section from the Swing tutorial on [How to Use Key Bindings|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]

  • Execute Code on closing frame

    Dear friends,
    I would like to know how to execute code on closing the frame.

              JFrame frame = new JFrame();
              WindowListener l = new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                             // Do here what you want ...                    }
              frame.addWindowListener(l);

  • How can I edit a black title frame?

    I'm now just experimenting with 8 short clips, trying to learn something about editing. Instead of using any of the "fun" title frames in PrE10, I want black opening and closing title frames. I placed these frames in my movie with the place holder Add Text in the center. Even though I select the Add Text and try to replace it with the text I want, the Add Text remains. I've tried everything. Can someone give me a step-by-step way to insert and edit black opening and closing titles with white text.
    One more thing. I bought a new HP computer (Windows 7, 8 RAM, 1TB hard disk) with PrE and Photoshop Elements preinstalled. I wonder if these are the full programs or just scaled down versions. In the control panel I see that PrE is 1.23 GB; Photoshop is 2.59 GB.

    Tommy,
    To get a black background in a Title, there are a couple of ways to achieve it.
    If the Title is placed on the Timeline, with nothing below it, i.e. on Video Track 1, and nothing above it, the background will show black. What we see as "black" in the Titler, is really Transparent, but if there are no pixels below that Title, it WILL be black, when one Exports/Shares.
    If there are videos below the Title, say a Video, or Still Image (Title would be on a higher Video Track), but we want the black to appear below the Text, blanking out the material below that Title, then we can first create Black Video (from the New Item button in the Project Panel - slightly different locations per versions of PrE), place that on Video Track 2, and the Title on Video Track 3. The Duration and placement of that Black Video would match up perfectly with the Title. Now, there will be black behind the Text, blanking out any Video below it. Another method would be to create a Filled Shape that fills the full Frame, and set its Fill to black. Then Text would be added in that same Title, above the black Filled Shape. This has the benefit of keeping both the black background and the Text in one Title, so only the placement and the Duration of the Title has to be considered - one does not have to adjust both the Black Video and the Title - they are combined into one Asset.
    Now, if you are still seeing "Add Text," there are two issues, that I can think of to cause this:
    When you went to edit that Template, you did NOT Select the Add Text placeholder, but instead, clicked with the Type Tool, and basically created a second Text Object, above that placeholder Text Object. You did not really edit the "Add Text."
    You have two Titles, where one is the Template with the "Add Text" placeholder Text, and the other with the Text that you did edit.
    When you open the Title Template into the Titler (the Title editor window), there are two ways to Select that "Add Text" placeholder Text. One can use the Selection Tool (the arrow), to click within the area of that placeholder Text. When you do, you will see a Bounding Box form around that Text Object, indicating that it has been Selected. From that point, one can make adjustments with the Handles on the Bounding Box, or they can then go to the Type Tool (the T), and edit the placeholder Text. The second is to use the Type Tool, and then click, or click+drag in the placeholder Text, to highlight all, or portions of that "Add Text" placeholder Text.
    The first method is useful if, for instance, one needed to edit just a letter in existing Text, as it's usually easier to isolate that single character, or characters. OTOH, if one clicks in the correct spot, within the existing Text, with the Type Tool, a step is saved.
    This article goes into more detail on Titles, and also has some links to tutorials on using Titler: http://forums.adobe.com/message/4976998#4976998
    Note: Some of those tutorials are for Premiere Pro (mostly CS 6), so the look of the Titler WILL be different from those in PrE, and a very few functions might be demonstrated, but unavailable in PrE. However, the vast majority of the instructions rely on the general mechanics of Titler, and those are the same in all versions of Premiere - they might just look a bit different.
    Good luck, and please report your progress.
    Hunt

  • How to keep applet's JFrame alive as browser's closed or, goes to other URL

    My applet has a JFrame that pops up when the applet is downloaded. Right now, if the browser goes to a different page or, if it is closed, the frame disappears.
    I would like to know how to keep the frame alive.
    Thanks.

    These comments applies to using the Applet PlugIn.
    One annoying thing about using the PlugIn is that every time you browse from your applet's page and return, it is destroyed and reinstantiated and then init'ed instead of just stop and start applied on the same applet object. One solution to maintaining state across multiple instances is to use static data. Here is an example that does this with a JFrame, since that is what the poster mentioned, although I usually just do this for the UI on the web page itself.
    This doesn't keep the frame visible when off the web page, but that seems to go against basic applet behavior.
    --Nax
    public class Applet1 extends JApplet
    {     private static JTextArea ui = new JTextArea();
         public void init()
         {     JFrame f = new JFrame("example");
              JScrollPane sp = new JScrollPane(ui);
              f.getContentPane().add(sp);
              f.setSize(200,200);
              f.setVisible(true);
    }

  • Close a Frame when another one opened

    How do i Close a frame (dependent Frame) when another frame opened
    dispose() method did nothing and so do system.exit(0); as the System.exit(0) close the whole app that meant also the frame i would like to open when the other frame closed and moved from " Memory " huge topic for me
    dispose(); didn't do what i really needed to happened
    please any suggestions ASAP ? i need that in swing app

    i used dispose() but didn't work with me as i noticed the memory usage with this java app when i run the app after closing the frame . the memory usage didn't change that meant as least the frame didn't closed or cleared from the memory ?!
            try {
                    Socket ss = new Socket("14.23.5.122", 1235);
                  //  JOptionPane.showMessageDialog(null, "Server's OK", "Connection", JOptionPane.INFORMATION_MESSAGE);
                    new LoginFrame().setVisible(true);
                  //  this.dispose();
                    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                } catch (UnknownHostException eh) {
                    System.out.println("Unknow Host Exception"+ eh.getMessage());
                } catch (IOException eo) {
                    System.exit(0);
                   System.out.println("IO Exception"+ eo.getMessage());
             /*finally{
            System.exit(0);
            }*/

  • Can Frame remember size and position of window when it is reopened?

    When I re-open the chapters in a book, I want each to open with the same size and position it had when it closed. Frame seems to randomly pick a size and location for each window. In a big book, I can end up with chapters strewn all over. Some are huge, some are small, and they overlap each other.
    An exception is chapters that were minimized the last time they were saved, in which case they re-open minimized, which is good behavior.
    Any way to tell Frame to remember where the window was last time I was using it?
    I'm using FrameMaker 8.0p277, unstructured.

    FWIW, I keep the .book file open on the side of the screen and use it to select a chapter to work on. The other chapters are kept minimized. I've found that this is the most efficient way to work and I can bounce between chapters quickly. So I guess I'm using the .book file like the "list of all open files" you mention.
    In FM 8, you can see a list of all open files by clicking Windows>More Windows. That shows a list of everything. The biggest problem with that is that it's not in any order that I can discern. If it were in alphabetical order or in the same order as the chapters of my book, it would be more useful.
    When I double-click on the name of a chapter, it opens in what seems to be almost a random size and position, which is the cause of my original post.
    Thanks,
    Cheryl

  • Different ways of closing a jDialog

    Im having a jdialog named SUBDIALOG' which will be invoked by an anotther jdialog named 'PARENTDIALOG'.
    to close the SUBDIALOG im using the method "dispose()" .
    When i reopen the SUBDIALOG a huge run time exception is thrown , which is at the bottom of this mail .
    I came to know that its a bug in JAVA which occurs while closing a frame .
    So please suggest me the different ways of closing a jDialog .
    In the SUBDIALOG ihave used a jTable which is editable .
    Whenever i invoke the dialog(containing the Jtable) for the first time , everything will go fine .
    After closing the dialog , if we re invoke it, i am unable to edit the Jtable . The following error is being thrown .
    java.lang.NullPointerException
    at sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:253)
    at sun.awt.im.InputContext.dispatchEvent(InputContext.java:238)
    at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:180)
    at java.awt.Component.dispatchEventImpl(Component.java:3565)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:3323)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3180)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    When you use the dispose method on your JDialog, it essentially releases the dialog from memory. So if you try to show the window again, that will throw the exception. I assume that you just want to hide the sub window, and not dispose of it.
    Let's say your dialog's class name is MyCoolDialog. Here's the command to close the window (use this inside a JButton's actionPerformed event):
    MyCoolDialog.this.setVisible(false);
    Also, don't forget to set the JDialog's default close operation sometime during the dialog's initialization:
    MyCoolDialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
    If you do want to dispose of the window (and not hide it), then remember to create a new reference to the window, set the default close operation to DISPOSE_ON_CLOSE, use the setVisible example I gave you above for the actionPerformed event, and that should bypass your null pointer exception.
    Miscellaneous edits to this post. I'm had a few ID-10-T exceptions this morning...lol.
    Message was edited by:
    HTPC2Good4U

  • Disposing frame from other class

    Hello,
    I have a problem closing another frame by pressing the button in a frame.
    I have this method in the frame I want closed
      public void closeWindow()
            dispose();
            System.out.println("==========================");
        }And I call the method using this piece of code
        public class btnOkHandler implements ActionListener
          public void actionPerformed (ActionEvent e)
              //deleteUser();
              dispose();
              ftest = new frmTest();
              ftest.closeWindow();
        }So the btnOkHandler class should dispose both the frame where the button is in (wich it already does) and it should dispose the frame frmTest wich it won?t do.
    I guess it won?t dispose it because it opens the frame with this piece of code :
    ftest = new frmTest();But I can?t seem to find a work around of how to call the method with dispose(); in it from frmTest.

    Late reaction I know, but I still havent figured it out.
    I will post a sample code of what I mean.
    I will post a code for frame1 and frame2.
    A button in frame1 opens frame2, and a button in frame 2 should close frame1.
    I have commented out what doesn't work. Well actually it does work but it doesn't work how I want it.
    I figure it bugs because I make an instance to frame1, and it disposes it. So basically I have:
    Frame1 open
    Frame2 open
    Instances frame1
    Another frame1 open
    Closes frame1, still leaving 1 frame1 open.
    Could anybody suggest how I could get rid of the instance new Frame1 but still being able to dispose that frame?
    import java.awt.*;
    import java.awt.event.*;
    public class Frame1 extends Frame
         private Button btnOpen;
          public static void main (String[] args)
                 new Frame1();
         public Frame1()
              createUI();
         /*public void close()
              setVisible(false);
              dispose();
         private class OpenHandler implements ActionListener
              public void actionPerformed (ActionEvent e)
                   Frame2 f2 = new Frame2();
                   f2.openWindow();
         public void createUI()
              setSize (350,350);
              setTitle ("Screen1");
             setVisible (true);
             setResizable (false);
              Button btnOpen = new Button("Open frame");
              btnOpen.addActionListener (new OpenHandler() );
              add (btnOpen);
    import java.awt.Button;
    import java.awt.Frame;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Frame2 extends Frame
         private Button btnClose;
          public static void main (String[] args)
                 new Frame2();
         public Frame2()
              setSize (350,350);
              setTitle ("Screen2");
             setVisible (false);
             setResizable (false);
             setLocation(500,500);
              Button btnClose = new Button("Close other frame");
              btnClose.addActionListener (new CloseHandler() );
              add (btnClose);
         public void openWindow()
              setVisible(true);
         private class CloseHandler implements ActionListener
              public void actionPerformed (ActionEvent e)
                 Frame1 f1 = new Frame1();
                   //f1.close();
                   //f1.setVisible(false);
                   f1.dispose();
    }Edited by: Nimzor on Mar 12, 2008 8:35 AM

  • Frames randomly changing?

    Hi, I'm using Adobe Premiere Elements 11 in order to make a parody series and I've been experiencing a weird and very annoying problem recently.
    See, what I have to do in a lot of the editing is use lip flaps of the animated characters to match up to the dialogue audio I have imported. I'll start laying down my lip flaps to basically "lip-sync" the animation frames with my audio, but when I finish syncing a line, that's when stuff goes wonky.
    I have 3 frames to work with at all times while doing lip-sync, the "closed mouth frame", the "slightly open mouth frame", and the "wide open mouth frame". For some reason, when I finish syncing a line sometimes, the frames will just spontaneously change (for example: a frame I KNOW was a wide open mouth frame will just change to a closed mouth frame, for seemingly no reason).
    I have checked frame by frame, this isn't a slow down issue, nor is this a mistake on my part. I save often, but even opening the project file back up to an earlier save doesn't solve the issue. I usually have to open the audio in a completely seperate project file, lip-sync it, render the video, and then import it into the bigger project now, but for a series that has well over 100+ lines per episode, you can see where this would eat up time and memory on my computer.
    Anybody that can offer a solution, please do.

    SilentlyVocal
    I will think about this some more in the morning. For now, think about the following and see if it might work for you to eliminate the issues that you described for your Premiere Elements project.
    You say that you work in a set of files. After you have a set sync'd, select all of those files (altogether), right click anywhere in the selection, select Group. And, then go on to the next set of files. Do the same for each group.
    Have you tried that to make sure what is put together stays together?
    But, I would ask "Do you actually see files moving around?" or "Is it that your effect has been altered, out of sync more or less?"
    More later.
    Thanks.
    ATR

  • Multiple Frames and Visibility

    Hi All,
    I am working with swings.
    I have two Frames say A and B.
    Frame A creates the instance of Frame B. Frame B accepts inputs from user forms the reqiuest. Then sends request to Agent and waits for response. Before sending request and receiving response I am closing the frame B window.
    But now Frame components of A is ot seen properly.
    Once the Frame B receives the response components of Frame A is seen.
    I want components of Frame A to be visible all the time.
    How can I do that.
    I hope I have clearly stated the problem.
    Thanks
    Smitha

    Hi,
    I think problem is due to single process.
    But I tried with threads. I am facing the same problem.
    Here is the sample code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.*;
    public class TestProgressBar extends JFrame implements ActionListener
    JProgressBar     progressBar;
         JButton               start, end;
         public TestProgressBar()
              super( "Test Progress Bar" );
              setSize( 200, 200 );
              setResizable( false );
              progressBar = new JProgressBar( 0, 100 );
              progressBar.setValue( 0 );
              progressBar.setStringPainted( true );
              start = new JButton( "Start" );
              end = new JButton( "End" );
              start.addActionListener( this );
              end.addActionListener( this );
              getContentPane().setLayout( new BorderLayout( ) );
              getContentPane().add( start ,BorderLayout.WEST);
              getContentPane().add( end,BorderLayout.EAST );
              getContentPane().add( progressBar,BorderLayout.SOUTH );
         public static void main( String args[] )
              TestProgressBar test = new TestProgressBar( );
              test.show();
         public void actionPerformed( ActionEvent ae )
              String action = ae.paramString() ;
              if( action.endsWith( "cmd=Start" ) )
                   progressBar.setString( "Do" );
                   TestTwoFrame twoFrame = new TestTwoFrame( progressBar);
                   twoFrame.show();
                   twoFrame.send();
              if( action.endsWith( "cmd=End" ) )
                   progressBar.setString( "Completed" );
                   System.exit( 0 );
         class TestTwoFrame extends JFrame
              //int count = 0;
              JProgressBar progressBar ;
              public TestTwoFrame( JProgressBar progressbar )
                   super( "test progress" );
                   setSize( 100,100 );
                   progressBar = progressbar ;
              public void send( )
                   dispose();
                   progressBar.setString( "Doing" );
                   TestThread testT = new TestThread( 200000000 );
                   //testT.yield();
                   testT.start();
         class TestThread extends Thread
              int count =0, loopCount;
              public TestThread( int loopcount )
                   loopCount = loopcount ;
              public void run()
                   while( count < loopCount )
                   count++;
    Thx
    Smitha

Maybe you are looking for

  • OBI Error While Running Query

    We are getting the following error (our group is relatively new to OBIEE tool). Any help/guidance in the following would be extremely appreciated - THANKS (when we select more than 1 column in Answers it trries to group.... If one column is selected,

  • Ipod partially recognized by windows and not at all by itunes

    I haven't been able to find any1 else with this problem but when I connect my ipod to my computer(using either USB 2.0 or firewire) the "Do not disconnect" screen appears on the ipod and then it just sits there. (it also charges but ya) The ipod does

  • Reg Workflow Copy while copying Purchase Requisition to different user ID

    Hello Guru's, Will anyone suggest me, i have copied a purchase requisition from user D1 to user ID2.  Once it has copied to ID2 it should work as per the workflow which is assigned to ID2.  But it is taking *ID1 workflow* is there any way to stop it

  • IPhoto (old-- version 8?) won't import photos from iPhone 5. Very buggy.

    I have an old version of iPhoto that is very buggy (we have an 06 iMac, to be replaced next month). Admittedly, when I've been prompted to rebuild the cache, I don't (what does that do, anyway?). Lately, my problems have been: 1) Certain photos from

  • Problem with favorites

    The " add to favorites" option is not showing in contacts when I add a new contact. Also the + sign for adding when in favorites was not showing until I deleted a couple of favorites. Any help?