Results 1 to 3 of 3
  1. #1
    blkhrt is offline Member
    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Default Need Help Please

    So after writing this code at school, then getting home and trying to do the same thing I am getting a strange error that I can not figure out. It occurs in line number 19 and says:

    Multiple markers at this line
    - Syntax error on token ";", { expected after
    this token
    - Syntax error, insert ";" to complete
    FieldDeclaration

    Any help would be great, thanks in advance.

    Java Code:
    package classes_objects;
    
    import java.awt.*;
    import javax.swing.*;
    
    public class ClearBluePools 
    {
    	// variables
    	private JButton[] btn = new JButton[3];
    	private JLabel[] lbl= new JLabel[3];
    	private JTextField[] txt = new JTextField[3];
    	private JPanel[] pnl = new JPanel[3];
    	private JPanel contentPanel;
    	private JRadioButton[] radio = new JRadioButton[2];
    	private ButtonGroup group;
    	private JTabbedPane tabbedPane;
    
    	// components
    	String[] names = { "Lenght", "Width", "Depth" };
    	
    	for(int i = 0; i < 3; i++)
    	{
    		btn[i] = new JButton("Button #" + (i +1));
    		lbl[i] = new JLabel(names[i]);
    		txt[i] = new JTextField(10);
    		pnl[i] = new JPanel(new FlowLayout());
    
    	}
    	
    	// Row 1
    	radio[0] = new JRadioButton("Play");
    	radio[1] = new JRadioButton("Diving");
    	pnl[0].add(radio[0]);
    	pnl[0].add(radio[1]);
    	
    	// Row 2
    	pnl[1].add(lbl[0]);
    	pnl[1].add(txt[0]);
    	pnl[1].add(lbl[1]);
    	pnl[1].add(txt[1]);
    	
    	// Row 3
    	pnl[2].add(btn[0]);
    	
    	// Row 4
    	JLabel lb1 = new JLabel("Fucker");
    	JTextField nigger = new JTextField(10);
    	
    	//content pane
    	contentPane1 = new JPanel(new GridLayout(4,1));
    	contentPane1.setPreferredSize(new Dimension(700,400));
    	contentPane1.add(pnl[0]);
    	contentPane1.add(pnl[1]);
    	contentPane1.add(pnl[2]);
    
    }
    }

  2. #2
    blkhrt is offline Member
    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Default Re: Need Help Please

    Nevermind I found out my error, forgot to put a constructor in. Does anyone know what to show current date and time in a different tabbed pane? Trying to do this but no luck.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,404
    Rep Power
    20

    Default Re: Need Help Please

    Please find and go through the Forum Rules -- particularly the third paragraph.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Posting Permissions

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