Results 1 to 2 of 2
  1. #1
    rcbandit is offline Member
    Join Date
    Aug 2011
    Posts
    16
    Rep Power
    0

    Default Call remote getter/setter

    I'm trying to implement this Java code where I want to call remote Java class and pass boolean flag:

    Java Code:
    final CheckMenuItem toolbarSubMenuNavigation = new CheckMenuItem("Navigation");
            toolbarSubMenuNavigation.setOnAction(new EventHandler<ActionEvent>()
            {
                @Override
                public void handle(ActionEvent e)
                {
    
                    DataTabs.renderTab = toolbarSubMenuNavigation.isSelected();
    
                    // call here the getter setter and send boolean flag
                    System.out.println("subsystem1 #1 Enabled!");
                }
            });

    Java class which I want to call:

    Java Code:
    public class DataTabs
    {
    
        public static boolean renderTab;
    
        public DataTabs()
        {
        }
    
        public boolean isRenderTab()
        {
            return renderTab;
        }
    
        public void setRenderTab(boolean renderTab)
        {
            this.renderTab = renderTab;
        }
    
        tabPane.setVisible(renderTab);
    
    }
    But when I tested the code it's not working. Can you help me to fit it?

  2. #2
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,377
    Rep Power
    5

    Default Re: Call remote getter/setter

    What does not working mean? You also need to provide more information as to what you are trying to do. Provide a step by step description. For example: where do you create an instance of your DataTabs class? And why do you declare renderTab static?

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. Replies: 1
    Last Post: 02-05-2013, 03:34 PM
  2. getter and setter method using Jcreator
    By couline in forum New To Java
    Replies: 7
    Last Post: 01-22-2012, 02:02 PM
  3. help with getter and setter methods of this question.
    By luciawashaya in forum New To Java
    Replies: 6
    Last Post: 11-01-2011, 11:28 AM
  4. getter and setter method help please!
    By merdzins in forum New To Java
    Replies: 2
    Last Post: 12-06-2010, 05:06 AM
  5. use of private in getter and setter
    By katturv in forum New To Java
    Replies: 1
    Last Post: 12-03-2010, 07:17 PM

Posting Permissions

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