Results 1 to 3 of 3
  1. #1
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

    Default Help, events in Jbutton class

    I need to do an action when I do click in a button in an applet
    but when I do click the button doesn't do nothing.
    Java Code:
    public boolean action(Event e,Object o)
    {
    
    if(e.target.equals(connec)){
    openConnection();
    this.panel1.setVisible(true);
    this.connect.setVisible(false);
    this.Result.setVisible(false);
    panel2.setVisible(true);
    consultPupil();
    sigPupil();
    showPupil();
    
    }
    if(e.target.equals(sig)){
    sigPupil();
    showPupil();
    
    }
    if(e.target.equals(ant)){
    antPupil();
    showPupil();
    
    }
    if(e.target.equals(ult)){
    ultPupil);
    showPupil();
    }
    if(e.target.equals(pri)){
    priPupil();
    showPupil();
    
    }
    return true;
    
    }

  2. #2
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default

    You have to call the updateUI() method of the panel that contains the components and then visualize them
    ;)

  3. #3
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

Similar Threads

  1. Call action of JButton from another class
    By geckolux in forum AWT / Swing
    Replies: 5
    Last Post: 08-04-2014, 06:17 PM
  2. Need Help With Button Events
    By adlb1300 in forum New To Java
    Replies: 5
    Last Post: 11-03-2007, 05:36 AM
  3. Help with keyboard events?
    By Bibendum in forum New To Java
    Replies: 2
    Last Post: 11-02-2007, 02:51 AM
  4. To capture events with struts
    By Ed in forum Web Frameworks
    Replies: 2
    Last Post: 07-04-2007, 06:01 AM

Posting Permissions

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