Results 1 to 6 of 6
  1. #1
    dejos456 is offline Member
    Join Date
    Nov 2009
    Posts
    18
    Rep Power
    0

    Default Calling a generated GUI function

    Hey,

    Is it possible to call a function (generated by the GUI editor in netbeans-> actionevent) within another GUI function? Its like this:

    The function in wich i want to call the other function:
    Java Code:
      private void NieuwActionPerformed(java.awt.event.ActionEvent evt) {                                         
            //Here i want to execute the function :private void OpslaanActionPerformed
    
            setTitle("Teksteditor   "+"nieuw");
            saved=false;
    }
    The function i want to call:
    Java Code:
    private void OpslaanActionPerformed(java.awt.event.ActionEvent evt) 
    {
            code for this function ......
    }
    Since im working with generated functions (actionperformed events) by the GUI editor i don't know exactly how to do this.

  2. #2
    dejos456 is offline Member
    Join Date
    Nov 2009
    Posts
    18
    Rep Power
    0

    Default

    any ideas?

  3. #3
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    10

    Default

    What's the problem? That's why beginners should never ever use an IDE. Get the basics first.
    Java Code:
    private void NieuwActionPerformed(java.awt.event.ActionEvent evt) {                                         
            OpslaanActionPerformed(evt) ;
            setTitle("Teksteditor   "+"nieuw");
            saved=false;
    }
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  4. #4
    dejos456 is offline Member
    Join Date
    Nov 2009
    Posts
    18
    Rep Power
    0

    Default

    Thx it worked

    I tried just calling it with OpslaanActionPerformed didnt knew it had to be followed by (evt).

    Working on a school project and we were kinda obligated to use a GUI.

    srry for the dumb question, just trying to learn java step by step :D

  5. #5
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    10

    Default

    If you have to use Netbeans at school for starting, your teacher is an idiot.
    Have fun :)
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  6. #6
    dinosoep is offline Senior Member
    Join Date
    Nov 2009
    Posts
    150
    Rep Power
    8

Similar Threads

  1. Replies: 3
    Last Post: 12-04-2009, 04:08 PM
  2. Weird problem upon calling same function twice
    By alin_ms in forum New To Java
    Replies: 2
    Last Post: 12-20-2008, 07:14 PM
  3. problem calling function from class to class
    By alin_ms in forum New To Java
    Replies: 3
    Last Post: 12-19-2008, 08:35 PM
  4. Calling Java Function through JSP
    By Vikrant Pawar in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 06-06-2008, 06:28 AM
  5. getting dynamically generated valus
    By abhiN in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 03-29-2008, 11:58 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
  •