Stage.setX doesn't work before stage.show is called?

I would like to set the position of a new window before its made visible. stage.setX and stage.setY don't have any effect before stage.show is called. Is it possible to set the window position before its made visible? If so, how?

This works for me. Can you post an example where it fails?
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
public class HelloWorld extends Application {
  @Override
  public void start(final Stage primaryStage) {
    final VBox root = new VBox();
    root.setAlignment(Pos.CENTER);
    final Button button = new Button("Press me");
    button.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        final Stage stage = new Stage();
        final VBox root = new VBox();
        root.getChildren().add(new Label("Thanks"));
        final Scene scene = new Scene(root, 200, 125);
        stage.setScene(scene);
        stage.initOwner(primaryStage);
        stage.initModality(Modality.APPLICATION_MODAL);
        stage.setX(100);
        stage.setY(100);
        stage.show();
    root.getChildren().add(button);
    final Scene scene = new Scene(root, 350, 200);
    primaryStage.setScene(scene);
    primaryStage.setX(200);
    primaryStage.setY(200);
    primaryStage.show();
  public static void main(String[] args) {
    launch(args);
}

Similar Messages

  • After a long in "stop" period, the internet connection (ethernet) doesn't work. before updating to mountain lion this problem didn't exist.

    after a long in "stop" period, the internet connection (ethernet) doesn't work. before updating to mountain lion this problem didn't exist.

    Gave up on the GUI.  This script derived from http://blog.netnerds.net/2012/07/os-x-how-to-setup-nat-on-lion-and-mountain-lion / seems to work for me:
    gwdev=en0 # This is my WiFi connection (has Internet connection)
    targetdev=en1 # This is the USB to Ethernet adapter (to give Internet connection)
    /sbin/ifconfig $targetdev down
    /sbin/ifconfig bridge0 create
    /sbin/ifconfig bridge0 up
    /sbin/ifconfig bridge0 addm $gwdev
    /sbin/ifconfig bridge0 $HOST_ADDR
    /sbin/route add default -interface bridge0 -ifscope bridge0 -cloning
    /usr/sbin/sysctl -w net.inet.ip.forwarding=1
    /sbin/ipfw add 100 divert natd ip from any to any via $gwdev
    /usr/sbin/natd -interface $gwdev -use_sockets -same_ports -unregistered_only -dynamic -clamp_mss -enable_natportmap -natportmap_interface $targetdev

  • Some of my photos in my slide shows (which worked before) suddenly show up black. They are visible on the upper part but not on the screen. What's wrong?

    Some of my pictures in my slideshows suddenly show up black. They worked before. I've tried editing to no avail; if I double click the pic in the upper bar it flashes for a nanosecond and disappears again. Since many are from the same place and only some are black, I don't know what to make of it. Help!

    Apply the fix below:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #1, followed by #3 and then #4 as needed.
    OT

  • After installing Lion, my microsoft office suite doesn't work anymore, and show this message: Application Power PC no longer available. How can I resolve it?

    Is there any possibilty to recover the use of my Microsoft Office suite, which doesn't work anymore after installing Lion?
    The programs display this error message: "no puede abrir la aplicación Microsoft Excel (o any other) porque las aplicaciones Power PC ya no son compatibles"
    thanks for your help

    You will need to upgrade your suite of MS programs.
    Older suites, like MS Office 2004, use program versions written for Macs with PPC processors. In order to use those apps in pre-Lion OS's on an Intel-processor machine, it was necessary to install Rosetta, software designed just for the purpose of using PPC-apps on an Intel machine.
    Unfortunately, Lion does not support Rosetta, so those apps no longer work.
    Solution - update them to a version which will work in Lion, such as the MS Office 2008 suite, or newer if available.

  • Microphone doesn't work on speaker, or during calls.

    AT&T, OS 6, Iphone 4.
    Microphoen doesn't work in phone calls, or speaker phone mode. Interestingly, it doesn't work either in my call when connected via blue tooth, where the microphone is actually part of the car's bluetooth system. Furthermore, the microphone works in Apps like Voice Memo Recorder, and Dragon Dictation.have a fix?
    Has anyone experienced this? I have not "restored" the phone, yet as I am unsure of what I might lose and need to backup before doing so.
    Thanks, in advance for your help!

    Good point Tik on my Razr I had similar issues and I cured the issue by simply power cycling and as soon as my Razr came back on and settled I power cycled it again that what helped my little guy.. and make sure to check all your sound settings b33

  • App Store doesn't work, iTunes Store shows 5002 Error

    After 5 min loading - no conntent. When i try to login into iTunes, it schows 5002 Error. No errors or notices in console.app.
    Help please

    First, see whether anything in these discussions helps:
    An unknown error occurred (5002) in Shopping Cart
    itunes store error 5002
    Unknown error 5002
    If not, see below.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • My map with ios6 doesn't work. It shows my location but map is just a grid. How do I fix this?

    How do I get a map and not just a grid on new ios6 maps. I have an iPhone 4.

    Katiplum wrote:
    I am located in Wisconsin right by Illinois boarder.
    I thought maybe map data was missing in your are, but just looked and that doesn't seem to be the case.
    Matt

  • FOTA in N73 doesn't work, it keep showing error

    Hello Sir,
    I am from India. I have a N73 ME. When i am trying to update device firmware over the air, with configured server profile, it says "Authentication failed, please check server id/password"
    I triple checked the settings, and found them correct. What happened, let me tell you step by step.
    1. Device manager
    2.  Check for update
    3. Chosen profile created by me.
    4 Then it shows checking for updates.
     then it shows error "Unable to authenticate, check server ID and password"
    Please help me out. What could be the problem.
    Solved!
    Go to Solution.

    No updates of N73 were released via fota, so checking with the device manager would give only 'no updates available', suffice to say it dont support that method of updating the firmware, in order to get that message get the correct settings from your provider also make sure the default profile is set to 'nokia'
    If a reply has solved your problem click Accept as solution button, doing it will help others know the solution. Thanks.

  • Phone Volume buttons doesn't work when you receive a call while listening to music

    It is surprising to see such a silly and annoying bug. I was listening to music at high volume. Then received a call when the phone was unlocked and on music player. Now the fun started. I cannot reduce the volume by the outside volume buttons where as the volume of voice stays same. Very annoying dis-pleasurable experience. Don't know if it is common on other iPhones but it happened consistently on iPhone6+.
    Workaround - If we lock the phone and use the volume buttons then it reduces and increases sound successfully.

    The point I am referring to is already when I picked the call the controls didn't switch to Phone App. The whole time Phone app is active on the screen volume is not reducing at all. Quirk of the system - there is no soft volume control on the phone app hence user has to use the Hardware side buttons only. When phone app is in focus and in control the volume controls should work. This is definitely a major bug.

  • Record Selection doesn't work with VS 2005 & CR 2008

    Hi all,
    Recently I installed CR 2008 with Service Pack 1 and integrate with Visual Studio 2005. I converted all the CR reports to CR 2008 while opening the VS project which was created earlier.
    My problem is when I load the Crystal report via created application, record selection formula doesn't work instead it shows all records. But in designing time it works fine. Reports which designed with SQL Server Stored Procedure working fine. But reports which designed by adding Tables don't work. It shows all the records without record selection.
    I used simple Record selection formula without using any parameter fields. like this
    tTransactionDetails.acid} = 1
    . still it didn't work.
    When I put break point and see assigned values in Report Document object. It shows
    Function evaluation timeout
    . and then run, it do the record selection. I did this several times, all the time if I see assigned values in Report Document object then the report showed the selected records only otherwise it shows all the records.
    I tried this just running the application exe, still the problem remaining.
    I have saved the reports without the data, so that it will always load the data from the SQL database.
    Please help me to solve this problem.

    Sorry i couldn't do search before I posted the thread. After posted, I just did a search and found the solution by reading [this thread|https://forums.sdn.sap.com/click.jspa?searchID=20348355&messageID=6774564|https://forums.sdn.sap.com/click.jspa?searchID=20348355&messageID=6774564].
    As it has suggested, I just delete the existing Crystal Report Viewer Control from the form and add it again by clicking on CrystalReportViewer version 12.0.2000.0. It worked.

  • LVOOP "call parent method" doesn't work when used in sibling VI

    It seems to me that the "call parent method" doesn't work properly according to the description given in the LabVIEW help.
    I have two basic OOP functions I am doing examples for. I can get one to work easily and the other one is impossible.
    Background
    There are 3 basic situations in which you could use the "call parent method"
    You are calling the parent VI (or method) of a child VI from within the child VI
    You are calling the parent VI (or method) of a child VI from within a sibling VI
    You are calling the parent VI (or method) of a child VI from a different class/object.
    From the LabVIEW help system for "call parent method":
    Calls the nearest ancestor implementation of a class method. You can use the Call Parent Method node only on the block diagram of a member VI that belongs to a class that inherits member VIs from an ancestor class. The child member VI must be a dynamic dispatching member VI and have the same name as the ancestor member VI
    From my reading of that it means situation 3 is not supported but 1 & 2 should be.
    Unfortunately only Situation 1 works in LabVIEW 2012.
    Here is what I want
    And this is what I actually get
    What this means is that I can perform a classic "Extend Method" where a child VI will use the parent's implementation to augment it's functions BUT I cannot perform a "Revert Method" where I call the parent method's implementation rather than the one that belongs to the object.
    If you want a picture
    Any time I try and make operation2 the VI with the "call parent method" it shows up for about 1/2 sec and then turns into operation.
    So there are only 3 possibilities I can see
    Bug
    Neither situation 2 or 3 are intended to work (see above) and the help is misleading
    I just don't know what I am doing (and I am willing to accept this if someone can explain it to me)
    The downside is that if situation 2 above doesn't work it does make the "call parent node" much less usefull AND it's usage/application just doesn't make sense. You cannot just drop the "call parent node" on a diagram, it only works if you have an existing VI and you perform a replace. If you can only perform situation 1 (see above) then you should just drop the "call parent node" and it picks up the correct VI as there is only 1 option. Basically if situation 2 is not intended to work then the way you apply "call parent method" doesn't make sense.
    Attachements:
    For the really keen I have included 2 zip files
    One is the "Revert Method labVIEW project" which is of course not working properly because it wants to "call parent method" on operation not operation2
    The other zip file is all pictures with a PIN for both "Revert Method" and "Extend Method" so you can see the subtle but important differences and pictrures of the relavant block diagrams including what NI suggested to me as the original fix for this problem but wasn't (they were suggesting I implement Extend Method).
     If you are wondering where I got the names, concepts and PIN diagrams from see:
    Elemental Design Patterns
    By: Jason McColm Smith
    Publisher: Addison-Wesley Professional
    Pub. Date: March 28, 2012
    Print ISBN-10: 0-321-71192-0
    Print ISBN-13: 978-0-321-71192-2
    Web ISBN-10: 0-321-71255-2
    Web ISBN-13: 978-0-321-71255-4
     All the best
    David
    Attachments:
    Call parent node fault.zip ‏356 KB
    Call parent node fault.zip ‏356 KB

    Hi tst,
    Thankyou for your reply. Can you have a look at my comments below on the points you make.
    1) Have to disagree on that one. The help is unfortunately not clear. The part you quote in your reply only indicates that the VI you are applying "Call Parent Node" to must be dynamic dispatch. There is nowhere in the help it actually states that the call parent node applies to the VI of the block diagram it is placed into. Basically case 2 in my example fulfills all that the help file requires of it. The dynamic dispatch VI's operation are part of a class that inherits from a given ancestor. Operation 2 for Reverted behaviour is a child VI that is dynamic dispatch and has the same name as the ancestor VI (operation2). The help is missing one important piece of information and should be corrected.
    2) True it does work this way. I was trying to build case 2 and had not yet built my ancestor DD for operation so the function dropped but wasn't associated with any VI. I was able to do this via a replace (obviously once the ancestor Vi was built) so this one is just bad operator
    3) Keep in mind this is an example not my end goal. I have a child implementation because this is a case where I am trying to do a "reverse override" if you like.
    3a) The point of the example is to override an objects method (operation2) with it's parent's method NOT it's own. The reason there is a child implementation with specific code is to prove that the parent method is called not the one that relates to the object (child's VI). If I start having to put case structures into the child VI I make the child VI have to determine which code to execute. The point of Revert method is to take this function out of the method that is doing the work. (Single Use Principal and encapsulation)
    3b) The VI I am calling is a Dynamic Dispatch VI. That means if I drop the superclass's VI onto the child's block diagram it will become the child's implementation. Basically I can't use Dynamic Dispatch in this case at all. It would have to be static. That then means I have to put in additional logic unless there is some way to force a VI to use a particular version of a DD VI (which I can't seem to find).
    Additional Background
    One of the uses for "Revert Method" is in versioning.
    I have a parent Version1 implementation of something and a child Version2. The child uses Version2 BUT if it fails the error trapping performs a call to Version1.
    LabVIEW has the possibility of handling the scenario but only if both Case 1 and Case 2 work. It would actually be more useful if all 3 cases worked.
    The advantage of the call parent method moving one up the tree means I don't have the track what my current object is and choose from a possible list, if, for example the hierarchy is maybe 5 levels deep. (so V4 calls V3 with a simple application of "call parent method" rather than doing additional plumbing with case structures that require care and feeding). Basically the sort of thing OOP is meant to help reduce. Anything that doesn't allow case 2 or 3 means you have to work around the limitation from a software design perspective.
    If at the end of the day Case 2 and case 3 don't and won't ever work then the help file entry needs to be fixed.
    All the best
    David

  • PC suite upgrade doesn't work.

    After an automatic upgrade at the version 6.81.13.0, the PC Suite doesn't work (before it were OK).
    I can't connect my 6680 with USB original cable and I can read this error message "Init IMediaControl2).
    My PC is a P4 3GHz, with 1024MB and Win XP SP2.
    Before the upgrade all works very good.
    What's happen?
    Thanks.

    Cannot recognize (Microsoft) antispyware prosess.
    Disconnected from internet (yes I got Internet connection back).
    Disabled firewall and antivirus. Started PC Suite (Repared it fron contol panel after system restore), Get connected does not react when DKU-2 is connected. As far as I remember when two weeks ago succeeded, some messages where seen (drivers installe or something) Now no messages.

  • Prompt option doesn't work

    Hi
    I have a 8703e and the DELETE ON: Prompt  option doesn't work.
    It show me only "delete/cancel" with out the option to choise from where i want to do that
    I have only one account email from a Lotus Notes Server 8
    Any recommendation? thank you so much for read me  
    Solved!
    Go to Solution.

    HI and thank you for your email.. yes we are using a blackberry enterprise server ... but anyway
    I was trying a lot of differents methods without success. Finally I found a solution.
    This is the recets:
    1) Create a backup from the desktop software at desk's client
    2) Wipe the blackberry device
    3) Re-install the account in the blackberry device
    4) Restore the backup from the desktop software.. but PreAttetion here!! in Advance way... one by one the differents option from the checklist... because When I was trying to do a complete restore (all in the same time) the problem were the same
    I don't know if there is another best solution.. but in this case It was fine.
    Eduardo A. Pinetti

  • Guixt problem, sometimes it doesn't work

    Hi SDN.
    We use guixt on ESS screens in EP6 sp20.
    As far as I remember the ITS is on pacth22.
    My user experiense that sometimes guixt doesn't work, but just show the original screen. 5 minutes later it works again.
    Ofcource it cannot be reproduced but happens now and then
    Does anyone have a clue of what I should look for?
    Thanks in advance
    Peter

    Hi Peter,
    I would first download the latest version of guixt.dll and guixt.exe from synactive.com.
    Then I would test it again.
    Regards,
    ScriptMan

  • The synchronisation of mediathek from the PC to the new IPad doesn't work.

    Hello community
    I've several Apple products is use, and so far I had no problems to get them synchronised or updated. I have on all of them the same music tiltles and apps.
    Yesterday I got a brand new IPad2 - WiFi 16 GB.
    And now I have some problems with the synchronisation of the mediathek from the PC to the IPad.
    It doesn't work. It shows the recommeded audio space, after starting the synchronisation it counts 5 steps of the synchronisation in the top bar of the screen;
    when it's finished, the recommendd space indication goes away, and the IPad is still "empty*. Exception: Some bought-in titles.
    I've checked several websites, but non of them was really useful. By the way, I've already updated the IPad as well as ITunes to the most acutal software release.
    and I've alredays reset the IPad back to the factories setting..
    Is there any good idea what I could do ??

    That is bizarre. Do you have any add-ons that change the default tab behavior? If so, try disabling them temporarily and see whether that helps.

Maybe you are looking for