Results 1 to 4 of 4
  1. #1
    fraka is offline Member
    Join Date
    Mar 2015
    Posts
    2
    Rep Power
    0

    Question Communication between classes

    I need help on JavaFX, I want one CLASS B to know that webEngine.getLocation() has changed in class A and and take this new value. Or simply to detect that webEngine.getLocation() has changed and pass its value to another method, for example when the URL changes in the application.

    Thanks.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Communication between classes

    Not really anything JavaFX specific. Basically you want to apply the observer pattern.

    Observer pattern - Wikipedia, the free encyclopedia
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    fraka is offline Member
    Join Date
    Mar 2015
    Posts
    2
    Rep Power
    0

    Default Re: Communication between classes

    thanks gimbal2, good to hear from you. thanks for advice, i will appreciate for an example. thanks

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Communication between classes

    Quote Originally Posted by fraka View Post
    i will appreciate for an example. thanks
    Good thing then that they are in the linked article.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Communication between two classes, both ways.
    By jelmer91 in forum New To Java
    Replies: 2
    Last Post: 11-03-2011, 10:16 PM
  2. Communication Lag :(
    By MuslimCoder in forum Networking
    Replies: 6
    Last Post: 03-11-2010, 07:30 PM
  3. Communication to PC
    By Dan_68c in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 09-30-2009, 04:01 PM
  4. communication between classes
    By willemjav in forum New To Java
    Replies: 10
    Last Post: 09-01-2008, 10:08 PM

Tags for this Thread

Posting Permissions

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