How to keep a Stage always on top...

Hi,
Anyone know how to tell one or more stages to always be in front ( z- order ) of another stage.
I'm not talking about modality, I need the stage in the back to be responsive.
Cheers,
Nuwanda

I know that using focused property really looks so mess for each and every Stage. But we have no option than that.
The code which I've given you works for controlling many stages not only two.
For eg.
Make a CustomClass which arranges the stages on Z-ORDER.
public class StageOrder implements ListChangeListener<Stage>{
    ObservableList<Stage> stages = FXCollections.observableArrayList();
    private boolean FIRST_TOP = true;
    public void setFirstTop(boolean b){
        FIRST_TOP = b;
    public StageOrder(){
        stages.addListener(this);
    public ObservableList<Stage> getStages() {
        return stages;
    public void refresh(){
        if(FIRST_TOP){
            for(int i = 0; i<stages.size(); i++){
                stages.get(i).toBack();
        }else{
            for(int i = 0; i<stages.size(); i++){
                stages.get(i).toFront();
    public void onChanged(Change<? extends Stage> c) {
        refresh();
    public void add(final Stage s){
        stages.add(s);
        s.focusedProperty().addListener(new ChangeListener<Boolean>(){
            public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
               refresh();
}Now to make things worked as Z-order :
final StageOrder stack = new StageOrder();
        stack.setFirstTop(false);
        //FIRST
        Group g = new Group();      
        Scene scene = new Scene(g);
        primaryStage.setTitle("1");            
        primaryStage.setScene(scene);
        primaryStage.setVisible(true);
        //SECOND
        Group childGrp = new Group();
        Scene childScn = new Scene(childGrp);
        Stage child = new Stage();       
        child.setTitle("2");      
        child.setScene(childScn);
        child.setVisible(true);
        //THIRD
        Group childGrp2 = new Group();
        Scene childScn2 = new Scene(childGrp2);
        Stage child2 = new Stage();               
        child2.setTitle("3");      
        child2.setScene(childScn2);
        child2.setVisible(true);
        //ADDING ALL STAGES
        stack.add(primaryStage);
        stack.add(child);
        stack.add(child2); The above code is applicable only when the focused is happened inside scene. The ordering get's distracted by TitleBar Mouse Clicked. So I would like you to make your own custome titlebar for making things worked properly.
Thanks.
Narayan

Similar Messages

  • How to keep Calendar Helper always on top?

    In my jsf page, I have a input field with a calendar helper. Below this, is a drop down combo box. My problem is that when i click on teh calendar helper, the calendar appears in a drop down manner, and inspite of this, my combo box which is below, overlaps and appears in the middle of my calendar. Is there a way to avoid this? Perhaps by keeping the calendar always on top, or atleast making the calendar appear on top rather as a drop down.?
    My code snippet is like this:
    <TR>
                                                 <TD width="40%" align="right" height="30"><h:outputText
                                                      styleClass="normalText" id="text12" value="#{msg.To}"
                                                      style="color: black; "></h:outputText></TD>
                                                 <TD width="60%"><h:inputText styleClass="inputText" id="text13"
                                                      onblur="return func_2(this, event);">
                                                      <f:convertDateTime dateStyle="short" />
                                                      <hx:inputHelperDatePicker />
                                                      <hx:inputHelperAssist inputAssist="true" autoTab="true" />
                                                 </h:inputText><h:message styleClass="message" id="message2"
                                                      for="text13"></h:message></TD>
                                            </TR>
                                            <TR>
                                                 <TD width="40%" align="right" height="30"><h:outputText
                                                      styleClass="normalText" id="text10" value="#{msg.Status}"
                                                      style="color: black; "></h:outputText></TD>
                                                 <TD width="60%"><h:selectOneMenu styleClass="selectOneMenu"
                                                      id="menu1">
                                                 <f:selectItems value="Option1" /></h:selectOneMenu></TD>
                                            </TR>

    We are having the same results. Have you heard of a "fix" for this?

  • How to keep a image lways on top of internal frames?

    Hello.
    I have a main frame with sevral internal frames. I need to put a image on this
    window that can move this image remotely.
    How to keep this image always on top of these internal frames?
    Is there any panel that can put on top of these internal frame?
    Many thanks.

    Thanks for you reply and sorry for my break English.
    I mean I need a image that moving on a frame which has internal Frames.
    When the image meet a internal frame while it's moving, this image will go under of the internal frame , so that we can not see the image any more.
    What i want to do is that let the image always keep on top of the window,
    even if it meet a internal frame.
    Just imagine the windows cursor. A cursor is always visible no matter where is it.

  • AS3 how to put the buttons always on top of the external swf in the code below?

    how to put the buttons always on top of the external swf in the code below?  I am  beginner use to as3, can someone help me?
    thanks, for all!!
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(loader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    loader.load(newSWFRequest);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btn listeners
    eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

    use:
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(loader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    loader.load(newSWFRequest);
    loader.x = Xpos;
    loader.y = Ypos;
    addChildAt(loader,0);
    // Btn listeners
    eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

  • How do I keep form6.0 ALWAYS ON TOP?

    Hello friends,
    Like Oracle Help, Is there any option in forms6.0 to keep them 'always on top' of other applications.
    Thanx in advance,
    regards,
    Praveenkumar Talla

    Hello,
    Actually I want to keep the runtime form at the top of other application, How to do this?
    regards,

  • Stage.nativeWindow.alwaysInFront how to keep the window always in front

    Hi, I've just written and application that needs to always be in front of the other applications. I have set the application's nativeWindow.alwaysInFront property to true, but, after a few other air applications open the application will get pushed behind. It seems to work when the first application opens up, but after opening a second time it will no longer be on top. Any suggestions? Thanks.

    One way is to browse your iTunes Music Library in the Finder and open the video file with QuickTime instead of playing it in iTunes. Then you have always-on-top and also fixes the "full screen on 2nd monitor" problem. Maybe not ideal, but a workaround.

  • How to open a form always on top but not at focus?

    I had a form application which will call another form as reference. May I know that is there any way I can to to set the called form always on top, but the focus is still set at the calling form so that I can still operate on the calling form?
    Many thanks
    MInny

    Hi:
    Thank you for reply to my question.
    I have tried your codes and apply them the following the form. However, I always got the following error:
    Error: (WWV-00000)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    My codes is:
    declare
    request_no number;
    blk varchar2(30) := 'DEFAULT';
    l_url varchar2(4000);
    begin
    request_no := p_session.get_value_as_NuMBER(
    p_block_name => blk,
    p_attribute_name => 'A_WORK_REQUEST_ID');
    l_url := 'portal30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=11880470335&p_arg_names=_sessionid&p_arg_values=&p_arg_names=work_request_id&p_arg_values='||request_no;
    portal30.wwa_app_module.set_target(l_url,'call');
    end;
    then,
    I created another form which has two fields and the dattype of pk is varchar2 and change manually put the pk's p_arg_value into the url.
    e.g.
    l_url:='PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=9029417810&p_arg_names=WORK_AREA_CD&p_arg_values=APP';
    portal30.wwa_app_module.set_target(l_url,'call');
    However, I still get the error message as below:
    Error: (WWV-00000)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    Your help would be highly appreciated.
    Wei Ye

  • How can I keep a window always on top?

    Im trying to have a windowed document always be on top of the main Photoshop window to use it as a guide/reference image and also for extracting colors from it. I know this is possible because I have seen it in a Youtube video.

    OSX
    Seems really stupid that you could only do it on Windows.

  • How to keep the stage aspect ratio when stage width=100%?

    Hey,
    if I would like to make an animation that always fits into the browser window by fitting the width to 100% I'm having trouble keeping the aspect ratio of the stage's height. I can only configure 100% there which will stretch the content also to 100% of the browser window's height. If I configure a pixel value for the height, then I am also stuck on this value.
    All I want is the stage to adjust to the width of the browser window, and the height of the stage to preserve the aspect ratio depending on the width.
    this video shows what I mean. unfortunately I am not familiar with coding: http://www.youtube.com/watch?feature=player_embedded&v=hrLt0Y9QAY8
    Can somebody help me?

    sorry can't get the code working properly onwith the html code function. Sorry for that

  • How to keep the dock always on the main screen?

    Hi
    I have a Wacom Cintiq as my secondary screen, positioned below the main monitor of MacBook Pro
    The problem is, that with this positioning, the Dock always jumps to the bottom of the Cintiq screen. I don't want it that way - I need to use Cintiq only as my drawing space, and keep the dock at the main screen. How can I do that (without repositioning the screens in the prefs)?
    Thanks

    Maybe you should consider reinstalling it in order to make it work again!
    Look here:
    http://europe.nokia.com/explore-services/ovi-maps/downloads-and-services
    Good luck and keep us up to date!  
    By clicking the "Kudos!" or the "Solution?" button on the right you can say "Thank You" and you´ll show the author and others that the post is useful.
    The day we stop improving is the day we stop being good.

  • How to resize the stage from the top instead of the bottom?

    Hi  I am trying to resize the stage in Flash CS4 from the top instead of the bottom, as I left too much space at the top of the stage and don't need the stage to be so big.  By default Flash resizes from the bottom.
    So is there a way of resizing from the top?
    Failing this, is there a way of moving all the symbols/objects in my project so that I don't create a motion tween but just move the objects for all of the frames in the project (i have quite a few tweens in the project)?
    Thanks
    Nick

    the built in Stage class has two handy properties...
    Stage.width and Stage.height

  • How to keep the tables headers on top and never scroll with the table?

    does anyone knows the code to do so?
    urgent needed.
    thx.

    Hi
    Do you need a window shows in the below website???
    http://www.milonic.com/mfa/2004-August/004742.html
    If so, view source the page.
    Newt.

  • How to keep a Fabric port always enable in a Cisco MDS 9000 Switch?

    Dear members:
    I work in Datacenter automation solutions using most part of time Virtualization softwares.
    I'm having an interst problem with a server while it is booting thru SAN using a logical volume stored in a EMC DMX4 array.
    We are trying to boot a VMWare ESX 4.1 OS, but when OS tries to change HBA BIOS driver to ESX device driver during boot process, the Server's HBA logged off from MDS Fabric that it is connected, ESX can't boot and I got a ESX standard prompt.
    I think that problem is becuase ESX 4.1 is taking too long to load Storage Drivers during boot process and the consequences is HBA logged off from Fabric.
    I already tried to change FLOGI parameters in HBA and Topology architecture, but I didn't have success.
    If a try to boot a Microsoft OS like Windows 2008, I don't have this behavior, and OS can boot from SAN without any problem.
    Please, if anyone have any idea about how to keep fabric port always enabled, let me know. Any idea or help is very welcome.
    Best Regards.
    Alexandre Nicolau

    Hi,
    You can take a look at this document:
    http://www.cisco.com/en/US/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND_40/QoSCampus_40.html#wp1099352
    Hope this helps, please rate if it does.
    Kind regards,
    - Adrian.

  • How can i keep the session always live and active

    how can i keep the session live ? i tried to call getmessages every 30 seconds and nothing happens
    i need your help to tell me how to keep session live always
    please i need steps which can help

    i open session
    then i login
    then i change status to active
    then i call dialexternalnumber
    but i want to know how you keep the session active can you please send me the steps in details how you keep your session active ? but please in detailed steps
    many thanks for your great effort

  • Music app always on top in ipad

    How do I keep music app always on top in ipad

    You can double-click the home button to open the taskbar, slide that to the right, and you should see some music controls - you just can't have it open on screen on top of other apps.
    You can try leaving feedback for Apple : http://www.apple.com/feedback/ipad.html

Maybe you are looking for

  • System Settings - Memory usage - Application

    In Memory Usage - Application, under System Settings, my slider is set to 100% and gives 2560 MB. I was wondering where this figure of 2560MB comes from, is that the max that FCE can use/access? I have 10Gb Ram on the system in total, why is FCE only

  • Unable to clear java cache and also unable to load JAVA Applets when QTP installed in PC

    Hi, I am facing a problem when QTP 11.0 along with Java 6 Update 22 and Java Plugin  installed in the PC. The Java Applets are not being loaded in the webpages, when I try to load it through QTP, but when I try to load the applets manually that is wo

  • Model & Algorithm for fraudulent  Credit Card transaction

    Hello Everyone, I am new to datamining. Currently I am working on an acedemic project related to credit card fraudlent transactions. My objective is to classify a new transaction as normal or fraudlent. AFAIK the classification/scoring will be differ

  • How to do print on both sides

    Hi all, How to print on both sides? Thank you very much Clara

  • SPDIF Input Setti

    My short question is "Is there any reason why the '' (in the SPDIF I/O tab)?in the Creative Audio Console would affect audio output generated by my PC?"?My problem is that my DD Optical Input (XBox 360) will only play smooth audio when the Input Sett