Results 1 to 6 of 6
  1. #1
    unkus_nob is offline Member
    Join Date
    Jun 2011
    Posts
    2
    Rep Power
    0

    Default Help! set dinamically visibility of panels

    Hello, I am writing because I have problems to manage the visibility of some components of my application.
    I'm doing a web application and I have many panels.
    I wrote this code in an attempt to control the visibility of the panels in response to an event from the user. Place the code:
    Java FX Code:
    var selectedPanel = panelHome;
    
       function gestione():Void{
         {selectedPanel}.visible=true;
         var pannelli=[panelHome,panelChiSiamo,panelContatti,panelDestinazioni,panelDinamico];   
         var   sizepannelli=(sizeof pannelli);
         var pannelli2=pannelli;
    
         delete selectedPanel from pannelli2;
    
         for (i in [0..sizepannelli] ) {
            {pannelli2[i]}.visible=false;
                 }
      };
    
    function chi_siamoOnMouseClicked(event: javafx.scene.input.MouseEvent): Void {
       selectedPanel=panelChiSiamo;
        gestione();
    
             }
    The idea is to create a sequence containing all panels,
    putting the visibility of selectedPanel = true, remove it from the sequence, and then set the visibility = false to all other panels.
    The selected panel is changed at the click of a button.
    would know someone help me?
    Thanks in advance
    Stefania
    Last edited by DarrylBurke; 06-21-2011 at 11:49 AM. Reason: Added code tags

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    How does your question relate to Java? You've posted some code but it doesn't look like Java code that I've seen. Could you be confusing Java with JavaScript? You know of course that they're about as related as ham is to hamster.
    Last edited by Fubarable; 06-21-2011 at 09:06 PM. Reason: wrong

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default

    Quote Originally Posted by Fubarable View Post
    You know of course that they're about as related as ham is to hamster.
    But I heard they both have hamstrings, so they're pretty much the same thing, right?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    unkus_nob is offline Member
    Join Date
    Jun 2011
    Posts
    2
    Rep Power
    0

    Default

    is JavaFX Script language!

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,238
    Rep Power
    19

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Need some help with panels inside panels
    By kakefjes in forum AWT / Swing
    Replies: 0
    Last Post: 03-17-2011, 11:36 AM
  2. Java Visibility
    By efozdel in forum New To Java
    Replies: 8
    Last Post: 07-07-2010, 03:36 AM
  3. Replies: 2
    Last Post: 04-19-2009, 05:39 AM
  4. Newbie help on visibility and static final
    By tornado in forum New To Java
    Replies: 3
    Last Post: 11-28-2008, 01:32 AM
  5. How to create object dinamically and call methods.
    By Gelembjuk in forum New To Java
    Replies: 8
    Last Post: 10-26-2008, 09:28 AM

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
  •