window.setPrefSize(380,450); window.setContentPane(newPane(ui.getRoot())); app.getGameScene().addUINode(window); } 開發者ID:AlmasB,項目名稱:FXGL,代碼行數:10,代碼來源:DeveloperMenuBarController.java 示例3: openColorAdjustDialog ▲點讚 2▼ importjfxtras.scene.control.window.Window;//導入方法...
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); root =newGroup(); scene =newScene(root, arenaWidth, arenaHeight, Color.BLACK); Platform.runLater(newRunnable() {@Overridepublicvoidrun(){ initFX(); } }); } 開發者ID:finneyj,項目名稱:GameArena,代碼行數:38,代碼來源:GameArena.java 示...
将图片用于控件import java.net.URL; 代码示例://1.创建一个Box作为顶层容器 Box root = Box.createHorizontalBox(); this.setContentPane(root); //2.在当前src文件夹中创建一个包images,将图片放入其中 //3.使用URL获取图片的存放位置 URL url = getClass().getResourc java swing 显示网络图片 java swing...
ProgressDialog p =newProgressDialog(d); d.getRootPane().setWindowDecorationStyle(JRootPane.INFORMATION_DIALOG); d.setResizable(setContentPane importjavax.swing.JDialog;/** * Returns the progress monitor container that is either a JDialog or a JInternFrame. *@returnthe progress monitor container */...