/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. */ package tooltip; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Tooltip; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; /** * @author paru */ public class PopupFrontingBug extends Application { /** * @param args the command line arguments */ public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage stage) { Button button1 = new Button("Hover over me"); button1.setTooltip(new Tooltip("Tooltip Button 1")); VBox box = new VBox(20); box.getChildren().add(button1); Scene scene = new Scene(box, 400, 300); scene.setFill(Color.CHOCOLATE); stage.setScene(scene); stage.setTitle("Popup Tooltip"); stage.show(); Stage anotherStage = new Stage(); anotherStage.setScene(new Scene(new Button("Window Over"), 200, 150)); anotherStage.show(); } }