I'd try removing the static from the method
--- java_help <[EMAIL PROTECTED]> wrote:
>
>
>
> java_help <[EMAIL PROTECTED]> wrote: Date: Tue, 9
> Nov 2004 06:08:37 -0800 (PST)
> From: java_help
> Subject: code help
> To: [EMAIL PROTECTED]
>
> hi guys
> could anyone help me in correcting my code.i tried
> but could not correct it.i am Lboard in java.this is
> for form entry code.the errror i am getting it is
> import javax.swing.*;
> import java.awt.*;
> public class Candidate extends japplet
> {
> //Variables for Panel
> Static JPanelPanel;
> //Variable for the Layout
> GridbagLayout g1;
> GridbagConstraints gbc;
> //Variable for the Labels
> Jlabel labelconID;
> Jlabel labelemplyID;
> Jlabel labelintName;
> Jlabel labeltestDate;
> Jlabel labeltestScore;
> Jlabel labelintDate;
> Jlabel labelComm;
> Jlabel labelRate;
> Jlabel labelStatus;
> Jlabel labelAccept;
> Jlabel labelCancel;
> //Variable for the Data Entry Controls
> JTextfield TextFieldconID;
> JTextfield TextfieldemplyID;
> JTextfield TextfieldintName;
> JTextfield TextfieldtestDate;
> JTextfield TextfieldtestScore;
> JTextfield TextfieldintDate;
> JTextfield TextfieldComm;
> JComboBox ComboRate;
> JComboBox ComboStatus;
> Jbutton ButtonAccept;
> JButton ButtonCancel;
> Public Static Void init()
> {
> //Initialise the Layout Variables
> g1=new Gridbaglayout();
> gbc=new GridbagConstraints();
> Panel=(JPanel).getcontentpane();
> Panel.setlayout(g1);
> //Initialize the labels Controls
> LabelconID=new Jlabel("Candidate ID");
> LabelemplyID=new Jlabel("Employee ID");
> LabelintName=new Jlabel("Interviewer Name");
> LabeltestDate=new Jlabel("Test Date");
> LabeltestScore=new Jlabel("Test Score");
> LabelintDate=new Jlabel("Interview Date");
> LabelComm=new Jlabel("Comments");
> LabelRate=new Jlabel("Rating");
> LabelStatus=new Jlabel("Status");
> LabelAccept=new Jlabel("Accept");
> LabelCancel=new Jlabel("Cancel");
> //Initialize the Data Entry Controls
> TextfieldcanID=new JTextfield(10);
> TextfieldemplyID=new JTextfield(10);
> TextfieldintName=new JTextfield(20);
> TextfieldtestDate=new JTextfield(10);
> TextfieldtestScore=new JTextfield(5);
> TextfieldintDate=new JTextfield(10);
> TextfieldComm=new JTextfield(10);
> Button Accept=new JButton("Accept");
> Button Cancel=new JButon("Cancel");
> String Rate[]={1,2};
> ComboRate=new JComboRate(Rating);
> String Status[]={"YES,NO"};
> ComboStatus=new JCombobox(Status);
> //Add Controls For Candidate Id
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=1;
> gbc.gridy=5;
> g1.setconstraints(labelcanID,gbc);
> Panel.add(labelcanID);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=5;
> g1.setconstraints(TextfieldcanID,gbc);
> Panel.add(TextfieldcanID);
> //Add Controls to Employee Id
> gbc.anchor=GridbagConstraints.NorthWest;
> gbc.gridx=1;
> gbc.gridy=8;
> g1.setconstraints(labelemplyID,gbc);
> Panel.add(labelemplyID);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=8;
> g1.setconstraints(TextfieldemplyID,gbc);
> Panel.add(TextfieldemplyID);
> //Add Controls For Interviewer Name
> gbc.anchor=GridbagConstraints.NorthWest;
> gbc.gridx=1;
> gbc.gridy=11;
> g1.setconstraints(labelintName,gbc);
> Panel.add(labelintName);
> gbc.anchor=GridbagConstraints.NorthWest;
> gbc.gridx=4;
> gbc.gridy=11;
> g1.setconstraints(TextfieldintName,gbc);
> Panel.add(TextfieldintName);
> //Add Controls For Test Date
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=1;
> gbc.gridy=14;
> g1.setconstraints(labeltestDate);
> Panel.add(labeltestDate);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=14;
> g1.setconstraints(TextfieldtestDate,gbc);
> Panel.add(TextfieldtestDate);
> //Add Controls to TestScore
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=1;
> gbc.gridy=17;
> g1.setconstraints(labeltestScore,gbc);
> Panel.add(labeltestScore);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=17;
> g1.setconstraints(TextFieldtestScore,gbc);
> Panel.add(TextfieldtestScore);
> //Add Controls to Interview Date
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=1;
> gbc.gridy=20;
> g1.setconstraints(labelintDate,gbc);
> Panel.add(labelintDate);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=20;
> g1.setconstraints(TextfieldintDate,gbc);
> Panel.add(TextfieldintDate);
> //Add Controls to Comments
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=23;
> g1.setconstraints(labelComm.gbc);
> Panel.add(labelComm);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=23;
> g1.setconstraints(TextfieldComm,gbc);
> Panel.add(TextfieldComm);
> //Add Controls to Rating
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=1;
> gbc.gridy=26;
> g1.setconstraints(labelRate,gbc);
> Panel.add(labelRate);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=26;
> gbc.setconstraints(ComboRate,gbc);
> Panel.add(ComboboxRate);
> //Add Controls to Status
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=1;
> gbc.gridy=y=30;
> g1.setconstraints(labelStatus,gbc);
> Panel.add(labelStatus);
> gbc.anchor=GridbagConstraints.Northwest;
> gbc.gridx=4;
> gbc.gridy=30;
> g1.setconstraints(ComboboxStatus,gbc);
> Panel.add(ComboboxStatus);
> //Add Buttons Accept,Cancel
> Button Accept;
> Button Accept=new Button(Accept);
> JButton.getcontentpane().add(Button);
> Button Cancel;
> Button Cancel=new Button(Cancel);
> JButton.getcontentpane().add(button);
> }
> }
>
>
> C:\jdk1.4\bin>javac Candidate.java
> Candidate.java:39: ';' expected
> Public Static Void init()
> ^
> 1 error
>
> and one more thing i wanted to know why we have an
> error such as no classmetthod found
>
> thanking u
>
>
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~->
If you have any comments or questions, submit it on the message board.
NO spam/ads/job posting or you will be BANNED from this group. Exception can be
made it happen by notify me ahead of time.
all new members' message will be verified by me (spam..) before it get posted.
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/java_official/post?act=reply&messageNum=17372
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/java_official/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/