Error on compling the Swing program

Hi all,
I am trying to run a Login Swing program. I am want to go to the next page on click of the LOGIN button.Here is my code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class login extends JFrame implements ActionListener {
     public login(){
          setTitle("Login Page");
          //setSize(500,500);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);
          Container pane = getContentPane();
          FlowLayout layout = new FlowLayout();
          pane.setLayout(layout);
          JLabel loginId = new JLabel("LoginId : ", JLabel.CENTER);
          JTextField Id = new JTextField(20);
          if(Id.equals("shri"))
               System.out.println("login successful");
          JLabel password = new JLabel("Password : ", JLabel.CENTER);
          TextField pwd = new TextField(20);
          pwd.setEchoChar('*');
          JButton Enter = new JButton("Log in");
          private void actionPerformed(ActionEvent e)) {
               String read = Id.getText();
               String in = new String(pwd.getText());
               //validate login and password here. validity will be done by sending login/password to the server
               if (read.equals("Shri") && in.equals("Shri")) {
               System.out.println("login successfull");
               } else {
               JOptionPane.showMessageDialog(this,"Incorrect login or password","Error",JOptionPane.ERROR_MESSAGE);
               Id.setText("");
               pwd.setText("");
               Id.requestFocusInWindow();
          pane.add(loginId);
          pane.add(Id);
          pane.add(password);
          pane.add(pwd);
          pane.add(Enter,BorderLayout.CENTER);
          setContentPane(pane);
          pack();
     public static void main(String[] args) {
          login enter = new login();
I'm getting the error->The type login must implement the inherited abstract method ActionListener.actionPerformed(ActionEvent)
     void is an invalid type for the variable actionPerformed
     Syntax error on token "(", ; expected
     Syntax error, insert ";" to complete LocalVariableDeclarationStatement
Please help me resolve this error and also to improvise the code.

You code had basic problem like declaration errors. Have modified your code.
Try this.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Login extends JFrame implements ActionListener {
    JLabel loginId;
    JTextField Id;
    TextField pwd;
    public Login(){
        setTitle("Login Page");
        //setSize(500,500);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
        Container pane = getContentPane();
        FlowLayout layout = new FlowLayout();
        pane.setLayout(layout);
        loginId = new JLabel("LoginId : ", JLabel.CENTER);
        Id = new JTextField(20);
        if(Id.equals("shri")) {
            System.out.println("login successful");
        JLabel password = new JLabel("Password : ", JLabel.CENTER);
        pwd = new TextField(20);
        pwd.setEchoChar('*');
        JButton Enter = new JButton("Log in");
        pane.add(loginId);
        pane.add(Id);
        pane.add(password);
        pane.add(pwd);
        pane.add(Enter,BorderLayout.CENTER);
        setContentPane(pane);
        pack();
    public void actionPerformed(ActionEvent e) {
        String read = Id.getText();
        String in = new String(pwd.getText());
        //validate login and password here. validity will be done by sending login/password to the server
        if (read.equals("Shri") && in.equals("Shri")) {
            System.out.println("login successfull");
        } else {
            JOptionPane.showMessageDialog(this,"Incorrect login or password","Error",JOptionPane.ERROR_MESSAGE);
            Id.setText("");
            pwd.setText("");
            Id.requestFocusInWindow();
    public static void main(String[] args) {
        Login enter = new Login();
}

Similar Messages

  • Error while registering the Concurrent Program

    Hi,
    I am getting the following error while registering the concurrent program.
    The executable is registered as shell script and this executable sends a mail with attachment. can any one of you tell me the cause of the error?
    ORA-20160: ORACLE error -4091 in SUBMIT: others
    Cause: SUBMIT: others failed due to ORA-04091: table APPLSYS.FND_CONCURRENT_PROGRAMS is mutating, trigger/function may not see it.
    The SQL statement being executed at the time of the error was: &SQLSTMT and was executed from the file &ERRFILE.
    ORA-06512: at "APPS.ALR_FND_CONCURRENT_PROGRAM_IAR", line 1
    ORA-04088: error during execution of trigger 'APPS.ALR_FND_CONCURRENT_PROGRAM_IAR'
    ORA-06512: at "APPS.FND_CONCURRENT_PROGRAMS_PKG", line 63
    FRM-40735: ON-INSERT trigger raised unhandled exception ORA-20160.
    Thanks in advance

    Check Note: 391795.1 - Frm-40735: On-Insert Trigger Raised Unhandled Exception Ora-04062 in APPS.FND_CONCURRENT_PROGRAMS_PKG
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=391795.1

  • Error when generating the update program RSAU484

    Hi,
    I am getting the following error while loading data into customer master  from CRM system
    Error when generating the update program
    Message no. RSAU484
    Diagnosis
    An error occurred during program generation for InfoSource MR_CDB_CUST_HFR and InfoProvider 0BPARTNER$T. This may be extrapolated to incorrect update rules.
    Procedure
    Check and correct your update rules and then generate the update program again. You can find help on the error in the error log.

    Yes,there is just a single line of code in the start routine
    DELETE DATA_PACKAGE WHERE CUSTOMER is initial.
    and update rules  for Business partner and customer market which are object mapped 1:1. No routines or formulaes.
    Could this be a technical issue on the flexible update or a data quality ?

  • Error when generating the update program

    Hi BW Experts,
    I am facing issue while loading data to cubes:
    0TCT_C01 & 0TCT_C02
    In load monitor (RSMO) -> details> some data pakages are going thru successfully while some are failing with error:
    Error when generating the update program
    Thanks

    Hello,
    Try activating both the cubes using RSDG_CUBE_ACTIVATE. Activate them even thou they seem active.
    Also you can refer to OSS Notes:
    Note 1146851 - BI 7.0 (SP 18): Error RSAU 484 when generating update
    Note 1152453 - Termination generating InfoCube write program
    Regards,
    Shashank

  • BW Statistics-BI7-Error when generating the update program

    Dear All,
    We faced the below problem in while executing the infopackages for BW statistics in BI7.0
    7099 records from 7099 records..but shows request is red.
    Error message during processing in BI
    Diagnosis
    An error occurred in BI while processing the data. The error is documented in an error message.
    System Response
    A caller 01, 02 or equal to or greater than 20 contains an error meesage.
    Further analysis:
    The error message(s) was (were) sent by:
    Update rules
    Procedure
    Check the error message (pushbutton below the text).
    Select the message in the message dialog box, and look at the long text for further information.
    Follow the instructions in the message.
    Update rules ( 7089  -> 0 Records ) : Errors occurred (RED)
    Update rules ( 7089  -> 0 Records ) : Errors occurred
    InfoCube 0TCT_C23 will be updated
    Error when generating the update program (RED)
    Is there any notes to apply for this?
    Initilaztion is executed with out any errors!!
    Regards

    Hi
    Caller 01 : If there is any inconsistecy while loading the data or if the program cannot able to execute a specific task it will give the caller errors.
    check in the transaction ST22
    check for the OSS notes 631668, 860475
    Check the below links which have a discussion on the same problem.
    A caller 01, 02 or equal to or greater than 20 contains an error meesage
    A caller 01, 02 or equal to or greater than 20 contains an error meesage.
    ERROR?
    Data load System error
    Hope this will help
    Regards
    Shilpa

  • Error when generating the update program::::ID RSAU No. 484****

    Helllo,
    While Infopackage loading for DS 2LIS_04_P_COMP following error is coming.. please see if anyone may face such kind of error.
    ***Error when generating the update program::::ID RSAU No. 484***
    Diagnosis
         An error occurred during program generation for InfoSource
         2LIS_04_P_COMP and InfoProvider ZISPP_C01 . This may be extrapolated to
         incorrect update rules.
    Procedure
         Check and correct your update rules and then generate the update program
         again. You can find help on the error in the error log.
    amit shetye

    hi,
    Do a check on the update rules and see if it returns no errors...
    if that is the case, then check the short dump and try to get the program name for the update rules..In se38 putting the program name, you can go inside it and do a check there as well if there are any errors....
    If in the end yo still dont find anything, try to delete and re-create the update rules..
    But i think you will get quite useful info from the dumps if there are any..
    hope this helps you..
    regrds,
    Jadeep

  • Error While executing the Standard Program RSEINB00

    Hi,
    I am trying to execute the Standard Program RSEINB00.
    The input parameters for this program are
    1. File path along with name
    2. Port.
    File path I am giving the application server directory along with the filename.
    For port. i have created a port in WE21.
    For both outbound parametes I selected the Physical directory and gave directory name and file name in both tabs and saved the port definition.
    Now I am passing the port to the RSEINB00 program.
    it is giving an error File cannot be opened.
    Can any one help me on this. Can someone guide me how to use RSEINB00 to read file from application server.
    thanks

    Hi,
    I think,you missed out some steps while creating Port.so please follow the below steps to resolve the issue.
    we21->click on your port number->outbound file tab->function module: EDI_PATH_CREATE_MESTYP_DOCNUM.
    outbound file: give file name .txt.
    and give the physical directory : /usr/sap/.......................................txt and save.
    and click on 'ACESS TEST' button and check any error is coming.
    go to outbound trigger tab-> give RFC destination name which we have created under a port in SM59.
    and one more important thing is check your unicode status is active or not.
    .Please get back me .if any issues.
    Kiran J

  • Error: While downloading the concurrent program

    I am trying to download the concurrent program using FNDLOAD command and I getting the error.
    Can anyone help me to resolve this
    FNDLOAD Command >
    FNDLOAD apps/PASSWORD@RTCDV1 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXAR3006_PROCA_CP.ldt PROGRAM CONCURRENT_PROGRAM_NAME="XXAR3006_HOSTA"
    ERROR Message
    APP-FND-01564: ORACLE error 12154 in AFPCOA
    Cause: AFPCOA failed due to Error while trying to retrieve text for error ORA-12154
    The SQL statement being executed at the time of the error was: and was executed from the file .
    Thanks in advance..
    Regards
    BS

    Hi,
    FNDLOAD apps/PASSWORD@RTCDV1 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXAR3006_PROCA_CP.ldt PROGRAM CONCURRENT_PROGRAM_NAME="XXAR3006_HOSTA"Try this syntax and see if it helps.
    FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME="<Application Short Name>" CONCURRENT_PROGRAM_NAME="<Concurrent Program Name>"
    Note: 602267.1 - How to Export a Concurrent Program and Executable Using Fndload ?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=602267.1
    Regards,
    Hussein

  • Error while copying the concurrent program

    Hi Experts,
    I am working on EBS 11i and database 9i. When i am trying to copy the existing concurrent program,it's giving below error.
    Error: Please enter a unique segment name, the segment name is already defined for other segment.
    Could you somebody help me to get rid off this error.
    Thanks.

    While copying the concurrent program, what is the short name and name for the new concurrent program?
    Hope you are not giving the same name as the old CP.
    By
    Vamsi

  • Error when running the LabVIEW program

    hello...........
    I'm newbie in LabVIEW....I have a problem when i'm running the LabVIEW program...i want to analyse data using the LabVIEW through the real experiment....
    My problem is, there is an Error when i try to start the program...This Error forced me to restart the program several times until it can run.......By the way, i'm using Picoscopes 3206 to connect the LabVIEW program in PC with the real experiment.....
    Here, I'm attached the picture that I snap when the Error occur....
    Attachments:
    error.JPG ‏222 KB

    You have to try to isolate the problem...
    Use 'Diagram disable' or 'Case' structure to run special part of code or try write a specific code to access and manage your equipment.
    Several questions could help: 
    - Are you up to date with your hardware driver?
    - Do you call external ressources (ex: dll)? perhaps with instability
    - Do you properly close connection with your equipment after using? 
    - With your offline mode, do you load all the code, including hardware driver or do you use a special method without no loading the specific code?
    - When you are able to run after many tries, is the program stable? Can you re-start it without exiting LabVIEW?

  • Error while calling the standard Program

    Hi,
    I am using the Program <b>RMDATIND</b>, While executing the program ,I am getting an error as  <b>The field MARC-AUSDT is not ready for input and was therefore not transfered. </b>.  What exactly this means?
    the message type used is MG. I have tried to trace this Error, in the program, I am uable to get this. Please help me, to sort out this problem.
    Thanks
    Manju

    ThankQ solved

  • To find error message in the standard program sapmv45a

    Hi friends,
    I have a following senario.
    Iam getting the following error mesage.
    INFO RECORD FOR VENDOR 'ABC' AND MATERIAL '00000678' DOES NOT EXIST.
    now my requirment is i should find from were this error message is being triggered.
    actualy my problem is its in production server i dont have the acess to debug it.
    even i dont have the mesage classs and mesage number also.
    How can i catch this error mesasge from the program code
    ie :  by checking the code of the program SAPMV45A
    Regards
    Priyanka.

    I got that mesage from ME13 tcode.
    now my requirement is
    in the line item i have material number '000000678'.
    now the end user is chaning tht material number ie : he is chaning from '000000678' to ' 000000600'.
    now for the ist material 000000678' the info record is maintained .
    but for the changed material  000000600' the info record is not maintained. so iam getting the error mesage as below.
    INFO RECORD FOR VENDOR 'ABC' AND MATERIAL '000000600' DOES NOT EXIST.
    Now my reuiremnt is i should skip this error mesage even when the material is changed ( ie if the info record is not maintained )  .
    ie :  it sholud allow me to process the flow of va01 tcode
    How can i do that.
    or is there any other solution for that.
    Regards,
    priyanka.

  • Error when compiling the upload program (Message no. RSAR233)

    Hello,
    I tried to upload data from a flatfile but I did modified the Comm.Structure, Trans.Structure and Transfer Rules.
    After <u><b>activating</b></u> the all changes, I check data from InfoPackage by previewing it. Unfortunately, I got the follow messages from the popup window:
    Error 8 when compiling the upload program: row
    227, message: Data type /BIC/CCABTWJI_STK01 was
    found in a newer
    I got this kind of problems many times. I solved it by create a new infosource and everything again. I don't think it's good idea to do this way.
    Any better solution would be sincerely appreciated?
    -WJ-

    Another solution:
    go out the transaction RSA1 ans return to the transaction RSA1 again.
    This would help for me without restarting anything.
    Thank you very much for all suggestion.
    -WJ-

  • I get errors When running the example programs SampleMetadataDiscoverer10g

    I installed database is 10g release 2 on Windows XP,and AWM version is 102010A.
    When running the example programs SampleMetadataDiscoverer10g.java to get the OLAP metadata,I get the following errors:
    oracle.express.idl.util.OlapiException: java.sql.SQLException: ORA-37158: CLOB &#25110;&#21487;&#21464;&#25968;&#32452;&#36755;&#20837;&#21442;&#25968;&#38169;&#35823;: (&#24773;&#24418; 6)
    ORA-06512: &#22312; "SYS.GENSERVERINTERFACE", line 46
    ORA-06512: &#22312; line 1
    at oracle.express.idl.ExpressConnectionModule.ServerInterfaceStub.connect(ServerInterfaceStub.java:694)
    at oracle.express.olapi.data.full.ExpressDataProvider.connect(ExpressDataProvider.java:436)
    at oracle.express.olapi.data.full.ExpressDataProvider.initialize(ExpressDataProvider.java:282)
    at oracle.olapi.examples.chapter4.MyConnection10g.connectToDB(MyConnection10g.java:126)
    at oracle.olapi.examples.chapter4.SampleMetadataDiscoverer10g.initialize(SampleMetadataDiscoverer10g.java:57)
    at oracle.olapi.examples.BaseExample.execute(BaseExample.java:32)
    at oracle.olapi.examples.BaseExample.execute(BaseExample.java:46)
    at oracle.olapi.examples.chapter4.SampleMetadataDiscoverer10g.main(SampleMetadataDiscoverer10g.java:44)
    Closing JDBC connection.
    Closed the connection.
    please..can someone give me some advice? thanks!

    I got the same error while doing "dp.initialize()"
    I fixed this error by chang the the "olap_api.jar class12.jar" to "o4j.jar".
    But i can't explain that.
    Can anyone tell me why?
    By the way , the "olap_api.jar class12.jar" are copy from the %ORACLE_HOME%\10.2.0\db_1\olap\api\lib .

  • Error   whille  excuting the driver programe of  smartform

    HI SAP gurus
    i am  getting error message  while executing  driver program 
    and error is
    No table line started. Output to cell not  
    kindly help me out
    thanks in advance

    Hi,
    In smartforms..You have to create a Line type which needs to be added for field. For the first field select new line and mention the line type.
    for the next fields select new cell without giving line type.
    Regards,
    Omkaram.

Maybe you are looking for

  • Delivering plant  on sales orders

    Hello I know that if I access to transaction XD02 under Sales Area Data on Shipping tab, I can set the Delivery Plant field, in order to take it automatically when I create a new sales order for that client, but, I am able to change it, does anyone k

  • Is there a way to create a user account that "expires", or self deletes itself after a set amount of time?

    I am hoping to find a way to create an Admin account for our parent body that can be used for items at home, "adding printers, software, wireless settings, etc...), but have that account either "expire" or self delete itself after say 72 hours? Thoug

  • CRIO9074 RT jitter every 10 sec. when writing data to SD card through 9802 module

    Hi,   I am trying to use cRIO 9074 to collect data from different sensors at 50Hz  and log the data to SD card plugged in 9802 module. I use FPGA- scan interface hybrid mode because some sensors are just based on analog signals and others(i.e.. IMUs)

  • Substr and Performance

    Hi I need to use below code in the package select 'x' from gl_Code_combination where segment1=substr('XXXX.XXSC0X.XXXXX1.000.4070.000000.AA01.0000.0',1,4) and segment2 = substr('XXXX.XXSCOX.XXXXX1.000.4070.000000.AA01.0000.0',6,6) in the for loop whe

  • Cannot place file in sidebar of Mac OS X Lion

    in Mac OS X Snow Leopard (10.6.x) I was able to place a file on the sidebar and when I clicked on it, it would open. Mac OS X Lion does not allow placing a file ( a .doc file, for example) in the sidebar. I know I need to convert an alias to a certai