Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 19 of 19

Thread: Uknown Variable Error

  1. #1
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Uknown Variable Error

    Hi all, I am trying to use a JFrame to open up extra windows that will prompt the user the Log In or Out, but I am getting an error with one of my variables that writes to Excel. If someone could help me out, that would be fantastic. There is something wrong with the variable "sheet" contained in the "while(i <= 4)"

      private void createLabel(WritableSheet sheet) throws WriteException
      {
     
        WritableFont times10pt = new WritableFont(WritableFont.TIMES, 10);
        times = new WritableCellFormat(times10pt);
        times.setWrap(true);
        WritableFont times10ptBoldUnderline = new WritableFont(WritableFont.TIMES, 10, WritableFont.BOLD, false, UnderlineStyle.SINGLE);
        timesBoldUnderline = new WritableCellFormat(times10ptBoldUnderline);
        timesBoldUnderline.setWrap(true);
        CellView cv = new CellView();
        cv.setFormat(times);
        cv.setFormat(timesBoldUnderline);
        cv.setAutosize(true);
        addCaption(sheet, 0, 0, "User");
        addCaption(sheet, 1, 0, "ID Number");
        addCaption(sheet, 2, 0, "Time Logged In");
     
        JFrame frame = new JFrame();
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setFocusable(true);
        frame.setResizable(false);
        JButton button = new JButton("LogIn");
        JButton button1 = new JButton("LogOut");
        JButton button2 = new JButton("Exit");
     
        ActionListener actionListener = new ActionListener()
        {
     
    		@Override
    		public void actionPerformed(ActionEvent e) 
    			{
    			for(int i = 1; i < 4; i++)
    			{
    					while(i <= 4)
    					{
     
    							Date now = Calendar.getInstance().getTime();
    							DateFormat customDateFormat = new DateFormat ("hh::mm::ss");
    							WritableCellFormat dateFormat = new WritableCellFormat (customDateFormat);					
    							String x = JOptionPane.showInputDialog(null, "User");
    							String y = JOptionPane.showInputDialog(null, "ID Number");			
    							JOptionPane.showMessageDialog(null, "User " + x + " with ID Number " + y + " Logged In Successfully");
    					                addCaption(sheet, 0, i, x);
    							addCaption(sheet, 1, i, y);
    							DateTime dateCell = new DateTime(2, i, now, dateFormat);
    						        sheet.addCell(dateCell);
    							break;
     
    					}
    				}
    			}
        };
        button.addActionListener(actionListener);
     
     
        Container contentPane = frame.getContentPane();
        contentPane.add(button, BorderLayout.WEST);
        contentPane.add(button1, BorderLayout.CENTER);
        contentPane.add(button2, BorderLayout.EAST);
        frame.setSize(300, 100);
        frame.setVisible(true);


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,541
    My Mood
    Hungover
    Thanks
    145
    Thanked 648 Times in 553 Posts

    Default Re: Uknown Variable Error

    What line is the error on?

    What variables are used on that line?

    Where do you declare each of those variables?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Member jdv's Avatar
    Join Date
    Jul 2014
    Location
    This Land
    Posts
    80
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: Uknown Variable Error

    "Cannot refer to the non-final local variable sheet defined in an enclosing scope"

    Sheet is referred to from within an inner class. You can try making it final.

  4. #4
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    Quote Originally Posted by jdv View Post
    "Cannot refer to the non-final local variable sheet defined in an enclosing scope"

    Sheet is referred to from within an inner class. You can try making it final.
    When making it final, I get a new error for all three lines containing "sheet" that state "cannot refer to the non-final local variable sheet defined in an enclosing scope"

    Quote Originally Posted by KevinWorkman View Post
    "What line is the error on?

    What variables are used on that line?

    Where do you declare each of those variables?
    The error occurs on three lines that all contain the word "sheet" within the "While" loop of the code that I posted

    The variable would be sheet?

    Sheet is only ever declared as "private void createLabel(final WritableSheet sheet) throws WriteException" or maybe I'm wrong, I went through the code and never saw the word "Sheet" anywhere but here, and the three times that I wrote it. This is all part of the JexelAPI for reading Microsoft documents so I am just beginning to learn it.

  5. #5
    Member jdv's Avatar
    Join Date
    Jul 2014
    Location
    This Land
    Posts
    80
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: Uknown Variable Error

    Quote Originally Posted by Joe4296 View Post
    When making it final, I get a new error for all three lines containing "sheet" that state "cannot refer to the non-final local variable sheet defined in an enclosing scope"
    That makes very little sense, because if you make it final, it shouldn't be referred to as non-final by the compiler. Either the compiler is broken, you mistranscribed the error, or you made a change but didn't save it (or the compiler is being fed a different file, etc.).

  6. #6
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    What would you recommend me doing then?

  7. #7
    Member jdv's Avatar
    Join Date
    Jul 2014
    Location
    This Land
    Posts
    80
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: Uknown Variable Error

    Quote Originally Posted by Joe4296 View Post
    What would you recommend me doing then?
    Triple-check everything. If you get this error when you have made the variable final, then something is wrong with your toolchain or environment (likely the latter).

    Making "sheet" final may not magically fix your event handler, but you should not be getting the error about non-final variables when the variable is made final.

    Start from first principles, working from the known to the unknown. Are you sure you saved the change? Is that change in a file that the compiler is working on? Do line numbers etc. match up in error messages (this is a good time to add a line of no-op code just to see the error line number change)? Work forward, without making any assumptions until they are proven, until you get to the actual problem.

  8. #8
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    I checked through everything and could not find a solution, is there a way I could create the JFrame and the "Write to Excel" two different classes and then port the button functions over? I'm new at this and there are not many helpful multi-class tutorials for what I'm trying to do...

  9. #9
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,103
    My Mood
    Mellow
    Thanks
    244
    Thanked 755 Times in 741 Posts

    Default Re: Uknown Variable Error

    Yes, it's possible to do what you describe, but I'm not sure exactly what you mean by "port the button functions over." Programming interactions among multiple classes or across multiple interfaces is not difficult, but it's a skill best learned using a crawl, walk, run, approach to be thoroughly understood.

    So that we can be more helpful, forget writing to Excel for now. Write a simple program that tries to do exactly what you're trying to do but instead of writing to Excel, write to the standard out. Get that as close to working as you can, post it with any errors you're getting and questions you have, and then we can go from there.

  10. #10
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    Alright thanks, I'll will go scour the web for tutorials now.

  11. #11
    Member jdv's Avatar
    Join Date
    Jul 2014
    Location
    This Land
    Posts
    80
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: Uknown Variable Error

    At the end of the day, all you are doing is hooking up an ActionListener to a Button in order for that button to do some work.

    So start with that: a button that does something simple, like prints a string to console or a JPanel or something.

    Then solve the problem of ActionListener.actionPerformed() overrides not being able to take non-final input. Have it print a passed-in value, for example.

    Your actionPerformed() is doing an awful lot of work for each button press, and it appears that the while loop can be refactored out completely, but this is beside the point.

    But, as suggested, work forward in discrete steps, moving from the known to the unknown until you craft the behaviour you want.

    The first step is to simplify to the smallest chunk of GUI action code you can.

    Check out: http://docs.oracle.com/javase/tutori...nlistener.html
    Last edited by jdv; August 1st, 2014 at 10:34 AM.

  12. #12
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    I took your advice and I started re-writing the code, no Excel for now, just building a foundation, but I have run into a small error... When the user is prompt to log in, I have it set up to catch if they don't enter any thing, thus, the program should void their log-in, the only problem is that this only works if they click "OK" on the JPanel, Clicking the exit button or cancel causes a series of errors to occur on the console. The error occurs anywhere where I implement "else if(y.equals(""))". Is there a way to have the code terminate if the exit button or cancel button are clicked rather than having a string of errors? Actually I fixed that error Just took a little thinking... My solution is not "optimal but I will post the code regardless

    	private class Handler implements ActionListener
    	{
     
    		@Override
    		public void actionPerformed(ActionEvent event)
    		{
    				String name =event.getActionCommand();
    				if(name.equals("Exit"))
    				{
    					System.exit(0);
    				}
    				else if(name.equals("Log-In"))
    				{
    					String x = JOptionPane.showInputDialog(null, "Full Name");
    					String y = JOptionPane.showInputDialog(null, "ID Number");
    					if(x.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
    					else if(y.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
    					else
    					{
    						JOptionPane.showMessageDialog(null, "User " + x + " With ID Number " + y + " Has Logged In" );
    					}
    				}
    				else if(name.equals("Log-Out"))
    				{
    				String y = JOptionPane.showInputDialog(null, "ID Number");	
    					if(y.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-Out Void");
    					}
    					else
    					{
    						JOptionPane.showMessageDialog(null, "User with ID Number " + y + " Has Been Logged Out");
    					}
    				}
    			}	
    		}
    	}
    	private class Handler implements ActionListener
    	{
     
    		@Override
    		public void actionPerformed(ActionEvent event)
    		{
    				String name =event.getActionCommand();
    				if(name.equals("Exit"))
    				{
    					System.exit(0);
    				}
    				else if(name.equals("Log-In"))
    				{
    					String x = JOptionPane.showInputDialog(null, "Full Name");
    					 if(x == null)
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
     
    					else if(x.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
     
    					 String y = JOptionPane.showInputDialog(null, "ID Number");
    					 if(y == null)
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
    					else if(y.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
     
    					else
    					{
    						JOptionPane.showMessageDialog(null, "User " + x + " With ID Number " + y + " Has Logged In" );
    					}
    				}
    				else if(name.equals("Log-Out"))
    				{
    				String y = JOptionPane.showInputDialog(null, "ID Number");	
    					if(y.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-Out Void");
    					}
    					else
    					{
    						JOptionPane.showMessageDialog(null, "User with ID Number " + y + " Has Been Logged Out");
    					}
    				}
    			}	
    		}
    	}
    Last edited by Joe4296; August 1st, 2014 at 01:03 PM.

  13. #13
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    So I have fixed my code and it does exactly what I want, and I believe it is optimized, but you all can be the judge of that. The next part I need to work on is now implementing Excel, as a side-note, it doesn't have to be excel, it could be Word, Notepad, or an array stored in the program that is accessible through the JFrame, I just need help setting it up. Regardless of what I choose, I need the "Full Name" and the "ID Number" to be stored once they are entered into the program. Thanks, Joe.

    Main:

    package total;
     
     
     
    import javax.swing.JFrame;
     
    import jxl.Workbook;
    import jxl.write.Label;
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.biff.File;
     
     
    public class Main
    {
    	public static void main(String[] args) throws Exception
    	{
    		Frame frame = new Frame();
    		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		frame.setSize(200, 100);
    		frame.setLocationRelativeTo(null);
    		frame.setResizable(false);
    		frame.setVisible(true);
     
     
     
    	}
     
    }

    Frame:

    package total;
     
     
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
     
    import javax.swing.JButton;
    import javax.swing.JFrame;
     
    import javax.swing.JOptionPane;
     
    public class Frame extends JFrame{
     
    //	private JLabel item;
    	private JButton button1;
    	private JButton button2;
    	private JButton button3;
     
    //	private JTextField item1;
    //	private JTextField item2;
     
    	public Frame()
    	{
    		super("4296 LogIn");
    		setLayout(new FlowLayout());
    //		item = new JLabel("This Is The Log-In/Log-Out Program For Warren's First Robotics Team #4296");
    		button1 = new JButton("Log-In");
    		button2 = new JButton("Log-Out");
    		button3 = new JButton("Exit");
    //		item.setToolTipText("Enter Your Real, Full Name");
    //		add(item);
    		add(button1);
    		add(button2);
    		add(button3);
    //		item1 = new JTextField("Enter Your Real, Full Name");
    //		add(item1);
    //		item2 = new JTextField("Enter Your ID Number");
    //		add(item2);
     
    		Handler handler = new Handler();
    		button1.addActionListener(handler);
    		button2.addActionListener(handler);
    		button3.addActionListener(handler);
    	}
     
     
    	private class Handler implements ActionListener
    	{
     
    		@Override
    		public void actionPerformed(ActionEvent event)
    		{
    				String name =event.getActionCommand();
    				if(name.equals("Exit"))
    				{
    					System.exit(0);
    				}
    				else if(name.equals("Log-In"))
    				{
    					String x = JOptionPane.showInputDialog(null, "Full Name");
    					if(x == null || x.equals(""))
    					{
    						JOptionPane.showMessageDialog(null, "Log-In Void");
    					}
     
    					else
    					{
    						String y = JOptionPane.showInputDialog(null, "ID Number");
    						if(y == null || y.equals(""))
    						{
    							JOptionPane.showMessageDialog(null, "Log-In Void");
    						}
    						else
    						{
    							JOptionPane.showMessageDialog(null, "User " + x + " With ID Number " + y + " Has Logged In... Congrats");
    						}
    					}
    				}
    				else if(name.equals("Log-Out"))
    				{
    				String y = JOptionPane.showInputDialog(null, "ID Number");
     
    				 	if(y == null || y.equals(""))
    				 	{
    					JOptionPane.showMessageDialog(null, "Log-Out Void");
    				 	}
    					else
    					{
    						JOptionPane.showMessageDialog(null, "User with ID Number " + y + " Has Been Logged Out");
    					}
    				}
    			}	
    		}
     
    	}

  14. #14
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    I'm sorry too post this much, I'm just trying to write this program for my schools Robotics team. I have reworked the code and taken out any need to export any data to excel, word, or notepad and have decided to go with a JTable. I have created two classes, a JFrame and a JTable along with a third, the JTabbedPane that I will hopefully use to switch back and for between logging in and out, and seeing who has used the program. The problem that I am having is I end up with an error when I run the program. It says "adding window to a container" which I believe I understand, I cant smash a table and a frame all into one. So how would I go about Fixing this?

    package total;
     
    import java.awt.Dimension;
     
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
    import javax.swing.JTabbedPane;
     
    import total.Frame;
    import total.Table;
     
    public class SplitPane extends JFrame
    {
    	Frame frame = new Frame();
    	Table gui = new Table();
     
    	JPanel firstpanel = new JPanel();
    	JPanel secondpanel = new JPanel();
     
    	JLabel firstlabel = new JLabel("First");
    	JLabel secondlabel = new JLabel("Second");
     
    	JTabbedPane tabbedPane = new JTabbedPane();
     
    	public SplitPane()
    	{
    		firstpanel.add(firstlabel);
    	//	firstpanel.add(frame);
    		secondpanel.add(secondlabel);
    	//	secondpanel.add(gui);
     
    		tabbedPane.add("First Panel", firstpanel);
    		tabbedPane.add("Second Panel", secondpanel);
    		add(tabbedPane);
     
    	}
    }

  15. #15
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,103
    My Mood
    Mellow
    Thanks
    244
    Thanked 755 Times in 741 Posts

    Default Re: Uknown Variable Error

    Don't mix AWT containers (Frame) and components (Table) with Swing containers (JFrame) and components (JLabel). Use all Swing.

    OR don't create your own classes that have the same name(s) as existing Java SE classes. (Of the two don'ts, this is apparently what you've done.)

    When you get a compiler error, post the whole error, like this:
    Exception in thread "main" java.lang.IllegalArgumentException: adding a window to a container
    	at java.awt.Container.checkNotAWindow(Container.java:483)
    	at java.awt.Container.addImpl(Container.java:1084)
    	at java.awt.Container.add(Container.java:410)
    	at TestClass2.<init>(TestClass2.java:23)
    	at TestClass2.main(TestClass2.java:35)
    The above error resulted from using your code with the offending lines uncommented. The second line from the bottom identifies the source of the error as line 23, and my line 23 is:

    firstpanel.add(frame);

    which is attempting to add a JFrame (frame) to a JPanel (firstpane). Another way of stating the error is "adding a top-level container to anything," which is not allowed. The top-level containers are: JFrame, JDialog, and JApplet. (Reference)

    To correct the error, change your design to avoid the above exception. For example, change the hierarchy of your current design to start with a JFrame to which the other lower-level components (JPanels, JTables, JLabels, etc.) are added. You'll also want to use a layout manager that supports the desired appearance of the resulting collection of components in the JFrame. Refer to A Visual Guide to Layout Managers.

    When you described switching views I thought of the CardLayout to present multiple views in the same container, so give that a look, but a JTabbedPane may work fine.

    Don't give up, and you're not posting too much.

  16. #16
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    I'm at a loss right now, based on your post, I would have to change my two classes, "Frame" and "Table" to be able to add them to my SplitPane without getting an error. My question is, how do you do this? I cant find any good documentation on the web and how could I change a JTable?

  17. #17
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,103
    My Mood
    Mellow
    Thanks
    244
    Thanked 755 Times in 741 Posts

    Default Re: Uknown Variable Error

    I don't believe you're getting an error due to the JTable - it's not a top-level container, so I don't see why that would have to change. You could change the JFrame to a JPanel.

  18. #18
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    My Mood
    Cold
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Uknown Variable Error

    So I changed my JFrame to a JPanel as suggested and it did not throw any errors but it also does not show up in the JSplitPane. Also, the JTable is still giving me the error "Adding a window to a container"

    Here my Main class:
    package total;
     
     
     
    import java.awt.Color;
    import java.awt.Container;
     
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
     
    import jxl.Workbook;
    import jxl.write.Label;
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.biff.File;
     
     
    public class Main
    {
    	public static void main(String[] args) throws Exception
    	{
     
    		JPanel frame = new JPanel();
    		frame.setBackground(Color.BLUE);
    		frame.setVisible(true);
     
     
    		Table table = new Table();
    		table.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		table.setSize(800,400);
    		table.setTitle("Table");
    		table.setVisible(true);
    		table.setResizable(false);
     
    		JPanel firstpanel = new JPanel();
    		JPanel secondpanel = new JPanel();
     
     
    		SplitPane tp = new SplitPane();
    		tp.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		tp.setSize(800, 600);
    		tp.setResizable(false);
    		tp.setVisible(true);
    		tp.setLocationRelativeTo(null);
    		secondpanel.add(frame);
    	//	firstpanel.add(table);
     
     
     
     
    	}
    }

    And here is how I declared the JPanel, I Hope it's correct?
    public class Frame extends JFrame{
     
    //	private JLabel item;
    	private JButton button1;
    	private JButton button2;
    	private JButton button3;
    	JPanel frame;
     
    //	private JTextField item1;
    //	private JTextField item2;
     
    	public Frame()
    	{
    		frame.setName("Login");
    		setLayout(new FlowLayout());
     
    		button1 = new JButton("Log-In");
    		button2 = new JButton("Log-Out");
    		button3 = new JButton("Exit");
     
    		frame.add(button1);
    		frame.add(button2);
    		frame.add(button3);
     
     
    		Handler handler = new Handler();
    		button1.addActionListener(handler);
    		button2.addActionListener(handler);
    		button3.addActionListener(handler);
    	}

  19. #19
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,103
    My Mood
    Mellow
    Thanks
    244
    Thanked 755 Times in 741 Posts

    Default Re: Uknown Variable Error

    Frame extends JFrame so is a JFrame, not a JPanel. Yes, you created an instance of a JPanel called 'frame' in your Frame class, but that is a separate object. new Frame() creates a Frame that extends JFrame not a JPanel.

    I'm not sure what SplitPane is, but that could be another problem if it is also a JFrame. For that matter, I don't know what Table is, so I suppose that could also be a problem. I assumed it was your own class extending JTable, but I'm beginning to think it's something else.

    I demonstrated above how to post errors. Please follow that rather than give us the short version or your interpretation of the error. If you can't sort out this mess on your own, you might also have to post all of your code so that we can help you sort it into parts that can work with each other.

Similar Threads

  1. can't find symbol - variable error
    By mios in forum What's Wrong With My Code?
    Replies: 9
    Last Post: December 7th, 2013, 01:44 AM
  2. Variable not initialized error in IF statements. probable simple fix.
    By GStateSwish in forum Loops & Control Statements
    Replies: 1
    Last Post: July 4th, 2013, 07:25 PM
  3. Variable error help
    By kreoty in forum What's Wrong With My Code?
    Replies: 3
    Last Post: December 7th, 2011, 03:36 PM
  4. Variable Error
    By SipOfJava in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 14th, 2011, 12:48 PM
  5. Semantic error: Variable assignment: please help!!
    By humdinger in forum Java Theory & Questions
    Replies: 1
    Last Post: November 17th, 2009, 02:28 PM