Results 1 to 4 of 4
  1. #1
    NexusFire is offline Member
    Join Date
    Feb 2015
    Posts
    2
    Rep Power
    0

    Default Cannot find symbol setVisable

    Java Code:
    package Calculator;
    
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    
    public class Calculator extends JFrame
    {
        
        private JLabel label;
        private JButton button;
        private JTextField text;
        
        public Calculator()
        {
            
            setLayout(new FlowLayout());
            
            label = new JLabel("Enter Operation");
            add(label);
            
            button = new JButton("Enter");
            add(button);
            
            text = new JTextField(15);
            add(text);
            
            event click = new event();
            button.addActionListener(click);
            
        }
    
        public class event implements ActionListener
        {
            
            public void actionPerformed(ActionEvent click)
            {
              
                label.setText("Hello");
                
            }
            
        }
        
        public static void main(String[] args)
        {
            
            Calculator gui = new Calculator();
            gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            gui.setVisable(true);
            gui.setSize(300, 125);
            
        }
        
    }
    Any help with this? I'm a beginner just testing things out. It says cannot find symbol
    symbol: method setVisable(boolean)
    location: variable gui of type Calculator
    ----
    (Alt-Enter shows hints)

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Cannot find symbol setVisable

    Try setVisible(true);

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    NexusFire is offline Member
    Join Date
    Feb 2015
    Posts
    2
    Rep Power
    0

    Default Re: Cannot find symbol setVisable

    lol i'm dumb ty
    and i had a different program with it and i was like WHY IS IT NOT WORKING

  4. #4
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Cannot find symbol setVisable

    Quote Originally Posted by NexusFire View Post
    lol i'm dumb ty
    You're Welcome! And you're only dumb if you think no one else has made a similar error. :)

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Cannot find symbol !Help Please!
    By Zarox in forum New To Java
    Replies: 3
    Last Post: 05-19-2013, 06:09 AM
  2. Cannot find symbol
    By sam.jj12 in forum AWT / Swing
    Replies: 2
    Last Post: 09-16-2012, 01:27 PM
  3. cannot find symbol
    By LimblessQuasar in forum New To Java
    Replies: 4
    Last Post: 06-11-2011, 10:55 PM
  4. Replies: 9
    Last Post: 10-18-2008, 08:26 PM
  5. Replies: 3
    Last Post: 05-01-2008, 08:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •