MCPcopy Create free account
hub / github.com/TheCyaniteProject/exit_code_java / create_Popup_Window

Method create_Popup_Window

src/main/java/exitcode/Apps.java:257–273  ·  view source on GitHub ↗
(String windowTitle, String message, Integer width, Integer height)

Source from the content-addressed store, hash-verified

255 }
256
257 public static void create_Popup_Window(String windowTitle, String message, Integer width, Integer height) {
258 //Create a new window
259 WindowBuilder window = new WindowBuilder(windowTitle);
260 window.setProcessName("popup.app");
261 window.setPrefSize(width, height);
262 Label messageArea = new Label(message);
263 try {
264 messageArea.setFont(Desktop.loadFont(Desktop.desktopFont, Desktop.desktopFontSize));
265 } catch (NullPointerException e) {}
266 messageArea.setWrapText(true);
267 messageArea.setStyle(Apps.windowFontColor);
268 window.setCenter(messageArea);
269
270 //Spawn the window
271 window.spawnWindow();
272 window.placeApp();
273 }
274
275 public static void create_Popup_Window(String windowTitle, String message) {
276 Apps.create_Popup_Window(windowTitle, message, 300, 225);

Callers 1

Calls 6

setProcessNameMethod · 0.95
loadFontMethod · 0.95
spawnWindowMethod · 0.95
placeAppMethod · 0.95
setPrefSizeMethod · 0.80
setFontMethod · 0.80

Tested by

no test coverage detected