ActionPerformed-method executed twice...

Please help!
My program behaves strangely; the actionPerformed method on a button is executed twice. The first execution completes the method as it should and makes changes to the model as it should. Then there comes the second execution triggered BY THE SAME BUTTON AT THE SAME TIME as the first execution. How is this possible? And how to fix things? There are no external triggers to the button.
Here is the example code showing the method actionPerformed and the output that it prints.
* Method to run when an answer is selected
public void actionPerformed(ActionEvent arg0) {
// Printout info on the action
System.out.println("EKO actionPerformed-method at beginning. Game level " + mymodel.getLevel());
System.out.println("EKO action command: " + arg0.getActionCommand());
System.out.println("EKO action was: " + arg0.ACTION_PERFORMED);
System.out.println("EKO action time: " + arg0.getWhen());
// Disable buttons
enableButtons(false);
// Call method setVastattu to notify the observers that an answer
// has already been selected (e.g. probressBar needs to be stopped)
mymodel.setAnswered();
if (arg0.getActionCommand()==mymodel.getKysymys()[1])
System.out.println("EKO answer was correct. Game level " + mymodel.getLevel());
// Call a method to set new choice texts on the buttons and to set the game level one higher
mymodel.levelUp();
System.out.println("EKO after levelUp-method. Game level " + mymodel.getLevel());
else {
JOptionPane.showMessageDialog(this, "Wrong answer!");
mymodel.setWrongAnswer();
EKO actionPerformed-method at beginning. Game level 1
EKO action command: Kuurupiilo
EKO action was: 1001
EKO action time: 1133534802433
EKO answer was correct. Game level 1
EKO levelUp method is setting game level to level 2
EKO after levelUp-method. Game level 2
EKO actionPerformed-method at beginning. Game level 2
EKO action command: Punahilkka
EKO action was: 1001
EKO action time: 1133534805567
EKO answer was correct. Game level 2
EKO levelUp method is setting game level to level 3
EKO after levelUp-method. Game level 3
EKO actionPerformed-method at beginning. Game level 3 <= WHY AGAIN???
EKO action command: Punahilkka <= SAME ACTION HAS ALREADY BEEN HANDLED
EKO action was: 1001 <= SAME ACTION HAS ALREADY BEEN HANDLED
EKO action time: 1133534805567 <= EVEN THE ACTION TIME IS THE SAME...

WOW!
Exactly! I indeed had the actionlistener added twice. I did not even know that it is possible to have several overlapping actionlisteners! Now my code works fine. Thank you very, very much!
Elisa

Similar Messages

  • Swing: actionPerformed method called twice

    Hi All,
    In a Swing application, is it correct to do as below piece of code, In a button click event handler call the actionPerformed method once again when the validation fails. Will it have any effects on the performance.
    The reason for me to ask this is because my Swing application works fine for a level of time. Then suddenly starts to call the actionPerformed method twice without any reason for each button click event.
    All I can suspect is the below piece of code. Pls help. Let me know if I am not clear.
    button_actionPerformed(ActionEvent e) {
      Actions .......
      If(!Validate) {
            button_actionPerformed(ActionEvent e);
    }

    ActionListener is there only once
    button.addActionListener(new java.awt.event.ActionListener() {     
       public void actionPerformed(ActionEvent e) {
             try{
                button_actionPerformed(e);
             catch (Exception ex)
                ex.printStackTrace();
    });

  • Methods of Workitem execute twice

    hello experts,
    in my workitem (activity  methods Tab), before work item execution there is a method to  display image, after the work item execution there is a method to close window.
    after our systerm imported new support packages,the methods execute twice. i can not find the reason and solution.
    i guess there is an inconsistent in systerm's time zone management, which is causing the time to execute display image and window close methods before workitem creation time.
    please give me your suggestions?
    Thanks in advance!

    What's worse is that it seems now your messages have started posting thrice
    Just a small note to remind you that version can be important, especially in this case where you have a problem related to packages. So you should include version information (release, support package level) in your description of the problem.
    Sorry I can't be of more help with respect to the problem itself.

  • ItemStateChanged method triggered twice everytime?

    hi all!
    im quite baffled trying to figure out why itemStateChanged method gets called twice if you change the value on the combo box. i tried looking for the answer in 5 different books but it just gives you code and no explanation. im sure im just doing something wrong. here is my code to better understand my problem.
    public class SwingTest extends JFrame implements ItemListener{
        Integer[] garage = {1,2,3,4};
        JComboBox cboGar = new JComboBox(garage);
        int ctr = 0;
        public SwingTest() {
            super("House Configurator");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   
            JPanel pane = new JPanel();
            setContentPane(pane);
            pane.add(cboGar);
            cboGar.addItemListener(this);
            System.out.println("constructor");
        public static void main(String[] args){
            System.out.println("main");
            JFrame frame = new SwingTest();
            frame.setSize(100,100);
            frame.setVisible(true);
            frame.setResizable(false);
        public void itemStateChanged(ItemEvent e) {
            System.out.println("itemStateChanged");
            ctr++;
            System.out.println("ctr: " + ctr);
    }if someone can give me a short explanation as to why the said method executes twice or if you can point me to a link which explains this, itll be truly appreciated.
    much thanks!
    enzo

    Add this line to your itemStateChanged (...) method and you'll see it for yourself:System.out.println(e);This is what it prints for the 2 ItemEvent-s: (bold added)
    java.awt.event.ItemEvent[ITEM_STATE_CHANGED,[b]item=1,stateChange=DESELECTED] on javax.swing.JComboBox[,35,5,35x25,layout=javax.swing.plaf.metal.MetalComboBoxUI$MetalComboBoxLayoutManager,alignmentX=0.0,alignmentY=0.0,border=,flags=16777544,maximumSize=,minimumSize=,preferredSize=,isEditable=false,lightWeightPopupEnabled=true,maximumRowCount=8,selectedItemReminder=1]
    java.awt.event.ItemEvent[ITEM_STATE_CHANGED,[b]item=2,stateChange=SELECTED] on javax.swing.JComboBox[,35,5,35x25,layout=javax.swing.plaf.metal.MetalComboBoxUI$MetalComboBoxLayoutManager,alignmentX=0.0,alignmentY=0.0,border=,flags=16777544,maximumSize=,minimumSize=,preferredSize=,isEditable=false,lightWeightPopupEnabled=true,maximumRowCount=8,selectedItemReminder=2]
    db

  • Init() method is executing twice

    Hi,
    I have a servlet & implemented the init() method. But, the init() method is executing twice.
    Also, the destroy() method is executing twice.
    Any input guys.
    Thanks

    JAXMServlet most certainly IS an HttpServlet - the javadocs that I see say it extends HttpServlet. It won't be very useful in a SOAP implementation if it's not.
    I thought the SingleThreadModel interface. Why? I thought that was a bad practice that was discouraged. What writable data members does this "test" servlet have that require such careful treatment? If your servlet implements doGet and doPost methods, with only local variables, it'll be thread-safe enough.
    I follow the Sun Java coding standards, even for dash-off classes. "test" should be capitalized. Is there no more descriptive name you can think of?
    I'm not aware of a problem with Tomcat, and I haven't checked the bug list. But I'd put my money on your code being the problem here. Do you call super.init() in your servlet's init() method? Maybe you're seeing the superclass init() being called?
    %

  • Operation Binding is executed twice

    Dear All,
    I created an Action Binding in my pageDef file. This will call the web service interface.
    In the action listener method of my button, I am invoking this action binding using this code
    below:
        OperationBinding method =
          getBindings().getOperationBinding("MyWebService");
        method.execute();All is well but I notice that when I looked at my HTTP Analyzer, I notice that my web service is called twice.
    Has anybody encountered this?
    I read about the blog by Shay about Web Service being called twice, https://blogs.oracle.com/shay/entry/web_service_across_pages_calle
    but I have a different use case than him as I have only one page.
    Anyone has hints?
    My problem causes double posting of transaction which is unnecessary.
    -JDEV 11G PS5
    -Web Service Business Services
    Edited by: Neliel on Nov 15, 2012 10:24 PM

    Have you tried to delay the call to the web service?
    Check https://blogs.oracle.com/shay/entry/delay_method_execution_when_us
    Timo

  • JSP executing twice

    I am calling one JSP from another, via a Javascript function, as I am using the onclick event of an image button. I am using the following code in the calling JSP:
    <INPUT onclick="nextcitation(this.document)" accesskey="N" type="IMAGE" src="images/nextCitation1.gif">
    and the javascript function is as follows:
    function nextcitation(d)
    d.myform.action = "nccaNextCitation.jsp"
    d.myform.submit();
    return false;
    The called jsp, "nccaNextCitation.jsp" sometimes executes once, like it should, and other times it executes twice, using a second newly spawned thread. This causes a real problem, as I am using this JSP to call a servlet which feeds keystrokes in a screen scraping application to a legacy mainframe app.
    It's the inconsistency part to this that's driving me crazy. If it always happened on the first time the button was clicked or the 2nd time, it would be much easier to debug. As it is, it some time happens right away, and other times will be ok until the 5th or 6th time.
    I've searched the forums and google, and have found a few references where this happens, but none of the suggestions (mainly adding "return false") have worked.
    Is there some browser setting or something in the response header I should be looking for?
    I'm using IE 6.0 and WSAD 4.0.3 as my development tool/server.
    Thanks!

    An image input control is really a submit control. Double-submission can happen if you have an onClick handler on a submit button and have that method also do a form.submit(). You can recreate this problem using the following code (irrelevant sections are left out):
    function submitTheForm() {
        document.form.submit();
    <form>
    <input type="submit" name="submitthisform" value="Click Me" onClick="submitTheForm()">
    </form>In the above case, the form itself is submitted in response to the submit button being clicked, but also in response to the form.submit() call.
    Instead of using an image control, why not just use an HREF around an image instead? For example:
    <img src="images/nextCitation1.gif" border="0">
    Michael

  • JSF action executed twice

    Hello all,
    sorry for my bad english.
    I've a simple form with only one <h:commandButton> who execute an action method.
    In this method i need to do a sleep of 60 seconds.
    The strange thing is that while waiting the 60 seconds, the action method is executed twice !
    This is my code:
    SimplePage.jsp
    <h:form id="simple_form">
      <h:commandButton id="ok_button" value="OK" action="#{bBean.doAction}" />
    </h:form>BackingBean.java
      public String doAction()
        try
          Thread.sleep(60000);
        catch (InterruptedException e)
          e.printStackTrace();
        return "ok";
       }Any help is appreciate.
    Carlo

    Hi Raymond,
    thanks for the reply.
    As you suggested , I've created a JSP page with only one form and submit button that fires an action who sleep for 60 seconds.
    In this case action is invoked only once.
    Any suggestion ?
    Thanks in advance
    Carlo

  • How can I count a method executed numer of times.

    Hi,
    I want to count that a method executed particular no.of times. If it crosses N no.of times then i should print the count and i should reset the count to zero.
    I have tried but i havn't get any idea to do it....Could you please give me some ideas to do it....
    -Thanks in Advance

    Thanks for reply....my requirement is...suppose i have a code with me...front end sends requests every time...if my code executes the request properly(Eg., a simple transaction) then it goes fine...if my code gets exceptions then i need to send a mail to particular persons...
    It is fine till now.....But i should not send mails each and every time.....If my code rises exceptions continously some N no., of times within 5 minutes then i need to send mail.........
    I hope you understood my requirement....I have tried for this one.....But I am not getting the solution....

  • Error:Work item 000000001099:Object FLOWITEM method EXECUTE cannot be execu

    Hello experts,
    I have created a Sales order workflow whr after creation sales order will go to 1 person inbox and he will check the SO thoroughly and thn i hv added a user decision step for APPROVED or REJECTED for same person.
    Now after creation of sales order it goin to the person inbox for checkin SO but when he is saving it thn decision screen with button APPROVED or REJCTED is not coming and m getting error :Work item 000000001099: Object FLOWITEM method EXECUTE cannot be executed. and error: Error when processing node '0000000024' (ParForEach index 000000)
    i checked the agent mapping for both step....and thr is no error in agent mappin...in both steps i have mapped same rule with responsibility IDs
    PLz suggest urgently wht can be cause of error.
    Regards
    Nitin

    Hi Nitin,
    I think this seems to be an agent assignment issue.
    To debug this issue go to the workflow log and check if the agents are correctly being picked by the rule or not. Simulate the rule and check for the agents being picked.
    In the workflow log, check the agent for the User Decision step. If there is no agent found then there might be some issue with the data passed to rule.
    Hope this helps!
    Regards,
    Saumya

  • BPM error: exception cx_merge_split occured,object FLOWITEM method EXECUTE

    Hi Guys
    I am working on a interface involving BPM.....
    I am facing this problem while executing the interface...
    I am getting error texts as below:
    exception cx_merge_split occured,
    object FLOWITEM method EXECUTE
    I am trying to fix it....Please provide any iputs on this...
    Thanx in adavance.

    Is your Transformation step designed for multimapping (n:1 or 1:n)?
    If yes the payload seems to be incorrect....did you check the working of your mapping (MM/ IM) using the expected payload structure...
    the transformation step in BPM has been given exception as System Error
    There is one block step before the transformation step...in which exception is not given...?can this be the cause??
    Does it mean...you have a Block step in your BPM and your Transformation Step is placed in it....the Block should have an exception handling branch...have the exception handling logic as per your need....the Block step needs to use Exception Handler...same Handler to be used in the Transformation Step's System Error section.
    Press F7 and check if your BPM is giving any warning message.
    Regards,
    Abhishek.

  • After Update Trigger executes twice when single row is uptd thro proc

    We have the below trigger in our db. When a single record is updated using a procedure the trigger is executed twice and it inserts two records in other table.
    But when i issue an update statement using any sql client tool it is executing only once and inserts only one record in other table.
    Can any one please help me to find the reason?
    Trigger:*
    create or replace TRIGGER CX_HEADER_ESCL_T1 AFTER UPDATE OF STATUS ON CX_HEADER
    FOR EACH ROW
    DECLARE
    "b1-CTRIYJ" boolean := FALSE;
    BEGIN
    IF UPDATING('STATUS') AND(:NEW.status = 'SUCCESS') THEN
    "b1-CTRIYJ" := TRUE;
    END IF;
    IF "b1-CTRIYJ" = TRUE THEN
    INSERT
    INTO siebel.s_escl_req(req_id, created, bt_row_id, rule_id, tbl_name, created_by, group_id)
    VALUES('11111111', CURRENT_DATE, :NEW.row_id, '1-CTRIYJ', 'CX_HEADER', :NEW.last_upd_by, '1-2CU3');
    "b1-CTRIYJ" := FALSE;
    END IF;
    END;
    Procedure:
    CREATE OR REPLACE
    PROCEDURE CLOSE_BATCH
    (ChildRecordCount IN NUMBER, HeaderId IN VARCHAR2, CompletionStatus OUT VARCHAR2) AS
    CafeChildCount NUMBER;
    BEGIN
    select count(*) into CafeChildCount from SIEBEL.CX_CHILD where HEADER_ID=HeaderId;
    IF ChildRecordCount = CafeChildCount THEN
    update SIEBEL.CX_HEADER set STATUS ='SUCCESS', MODIFICATION_NUM = MODIFICATION_NUM+1 where HEADER_ID=HeaderId;
    CompletionStatus := 'SUCCESS';
    ELSE
    update SIEBEL.CX_CHILD set STATUS='FAILED' where HEADER_ID=HeaderId;
    update SIEBEL.CX_HEADER set STATUS='FAILED' where HEADER_ID=HeaderId;
    CompletionStatus := 'FAILED';
    END IF;
    commit;
    /*CompletionStatus := 'SUCCESS';*/
    EXCEPTION
    WHEN OTHERS THEN
    CompletionStatus := SQLCODE;
    rollback;
    END;

    Your problem seems not be related to the trigger restart issue I have already mentioned because you are using a AFTER UPDATE trigger and not a BEFORE UPDATE trigger:
    >
    BEFORE Triggers Fired Multiple Times
    If an UPDATE or DELETE statement detects a conflict with a concurrent UPDATE, then Oracle Database performs a transparent ROLLBACK to SAVEPOINT and restarts the update. This can occur many times before the statement completes successfully. Each time the statement is restarted, the BEFORE statement trigger is fired again. The rollback to savepoint does not undo changes to any package variables referenced in the trigger. Your package should include a counter variable to detect this situation.
    >
    If you are sure that you update a single row and that your trigger fires twice and if you can easiily reproduce the issue, I recommend that you contact Oracle Support and create a Service Request for your issue that could be an Oracle bug.

  • WPF Animation execute twice

    Hi All,
    I faced an issue regarding the Animation execute twice, please check the code:
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto"/>
    <ColumnDefinition Width="*"/>
    <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <ListView x:Name="lstHandled" Grid.Column="0" Visibility="Visible">
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListView.Triggers>
    <EventTrigger RoutedEvent="ListView.MouseEnter">
    <BeginStoryboard>
    <Storyboard>
    <ThicknessAnimation
    Storyboard.TargetName="spAll"
    Storyboard.TargetProperty="(StackPanel.Margin)"
    From="-100,0,0,0" To="0,0,0,0"
    AutoReverse="False"
    Duration="0:0:1"/>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger>
    </ListView.Triggers>
    </ListView>
    <StackPanel x:Name="spAll" Grid.Column="0" Width="100" Margin="-100,0,0,0" Orientation="Horizontal">
    <ListView x:Name="Handled">
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    </ListView>
    <ListView x:Name="UnHandled">
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    </ListView>
    <StackPanel.Triggers>
    <EventTrigger RoutedEvent="StackPanel.MouseLeave">
    <BeginStoryboard>
    <Storyboard>
    <ThicknessAnimation
    Storyboard.TargetName="spAll"
    Storyboard.TargetProperty="(StackPanel.Margin)"
    From="0,0,0,0" To="-100,0,0,0"
    AutoReverse="False"
    Duration="0:0:1"/>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger>
    </StackPanel.Triggers>
    </StackPanel>
    </Grid>
    Here is the screenshot:
    When the mouse leave the "spAll" StackPanel. It fired the Mouse Enter event for the ListView. How to avoid this issue? 
    Thanks a lot!
    The future belongs to those who believe in the beauty of their dreams.

    You put your other two listviews in the same column of the grid.
    Since they're defined later, they will be above the first listview... and cause your problem.
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto"/>
    <ColumnDefinition Width="*"/>
    <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <ListView x:Name="lstHandled" Grid.Column="0" Visibility="Visible">
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListViewItem>Jimmy</ListViewItem>
    <ListView.Triggers>
    <EventTrigger RoutedEvent="ListView.MouseEnter">
    <BeginStoryboard>
    <Storyboard>
    <DoubleAnimation
    Storyboard.TargetName="spAll"
    Storyboard.TargetProperty="(StackPanel.Width)"
    From="0" To="120"
    AutoReverse="False"
    Duration="0:0:1"/>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger>
    <EventTrigger RoutedEvent="ListView.MouseLeave">
    <BeginStoryboard>
    <Storyboard>
    <DoubleAnimation
    Storyboard.TargetName="spAll"
    Storyboard.TargetProperty="(StackPanel.Width)"
    From="120" To="0"
    AutoReverse="False"
    Duration="0:0:1"/>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger>
    </ListView.Triggers>
    </ListView>
    <StackPanel x:Name="spAll" Grid.Column="1" Width="0" Orientation="Horizontal">
    <ListView x:Name="Handled">
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    <ListViewItem>Hello</ListViewItem>
    </ListView>
    <ListView x:Name="UnHandled" Grid.Column="2">
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    <ListViewItem>World</ListViewItem>
    </ListView>
    </StackPanel>
    </Grid>
    The above puts your listviews in different columns, although I'm not 100% sure that's what you wanted to happen.
    You would also have to animate the first listview if you want that to disappear.
    There's a potential problem there since as you do that your mouse will leave it.
    I guess you're probably just kind of playing around learning stuff here though.
     PS
    I based this on your first, now deleted, thread.
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Why the code in a user exit is executed twice?

    Hi all,
    I've got a development in a user exit EXIT_SAPMP56T_001.
    This user exit allows us to control the travel expenses.
    When you go to the TX: PR05 you can see a list with travels to add expenses. Here you can select one item on the list and press the edit button to add new expenses.
    We want to control this and we use this user exit for that purpose.
    When the user selects a row and presses the edit button, the user exit is triggered. We can check the values of the table and see which row is selected. But this exit is executed twice. The first time the table doesn't have any changes on it, the second time it has marked the selected row.
    Why is this happening? Why is this exit executed twice? And how can I control that the table is properlly updated?
    Thank you.

    Hi,
    I think this user exist in getting triggered both in the PAI and PBO of that screen.
    For avoiding this use the flag.
    If flag is initial then only your code needs to trigger.
    if flag is initial.
    flag = 'X'.
    then your code.
    endif.
    So when it again comes into the PBO it will check the flag and the same code will not be triggered for the second time.
    With Regards,
    Sumodh.P

  • Passing a variable from init to actionPerformed method

    hi everyone!
    i d like your help on how i can pass two variables (wager, bankBalance)
    to actionPerformed method. variable bankBalance is initialized out of init method(is it right?) and i prompt the user to set a wager in the method init.
    i want to pass these values in actionPerformed in order to do the calculation bankBalance+wager.
    public class Wager extends JApplet implements ActionListener {
         JLabel die1Label, die2Label, sumLabel, pointLabel;
         JTextField die1Field, die2Field, sumField, pointField;
         JButton rollButton;
         final int WON=0, LOST=1, CONTINUE=2;
         int bankBalance=1000;
         boolean firstRoll=true;
         int sumOfDice=0;
         int myPoint=0;
         int gameStatus=CONTINUE;
         // setup GUI components
         public void init()
         int i;      
         do {
      String k = JOptionPane.showInputDialog(null, "Enter a number less than 1000 but greater than 0");
       wager= Integer.parseInt(k);
    } while (wager > 1000 || iwager< 1);
    public void actionPerformed (ActionEvent actionEvent)
    {

    This was answered in the other thread that you double posted. What's the problem?
    You can't PASS those to ActionPerformed. Like I said before, you have to make them class variables:
    public class Wager implements ActionListener
        private int wager;
        public void actionPerformed(ActionEvent event)
            // Now you can work with wager here, because it's a class variable.
    }%

Maybe you are looking for

  • I have iTune accounts under two separate Apple IDs.  Can I merge them into one account under one ID?

    I have iTune accounts under two separate Apple IDs.  Can I merge them into one account under one ID?  I have purchased music and video in both.

  • Admin console does not open

    Hello everybody!! this is my first post.Please help me. I am new to JEE and i am having problem in starting it.I have installed JEE 5 update 3 on win XP and i am using Firefox mozilla as my browser. The installation of JEE goes fine and i get the con

  • Help with a database view/table

    Hi, I have seperate oracle9i database on one machine (UNIX). Myview view has poor performance in dbtest, but it has good performance in dbdev. Both DBs are having relatively similar configuration. When I set the autotrace on I realized the indexes ar

  • Photo uploading error in Portal

    HI Experts, I have configured the ARCHIVELINK to store the photo in Content Server. Manage to upload the photo and display the photo in PA20/30 from the backend ECC system. but my requirement is when we click and go back to same screen where we uploa

  • Create proxy to an object created by a wcf service class

    Hi We are trying to develop a WCF Service which is configured as per-session. The service object creates another object which has some data + functions, and has its own Interface which is available on both client and server. Is it possible to somehow