Dokument mit Javafx -API von Version 23.0.1 von Javafx Laufzeit von
Version 17.0.6
*** Beendigen Sie aufgrund der ungewöhnlichen Ausnahme 'nSsinternalinconSconconceNture', Grund: '0 x brodhinsex0 -args' NSInternalinconconceConception ' /> NStrackingrecttag. Häufige mögliche Gründe hierfür sind: 1. Bereits
diesen TrackingRectag -2. /> 0x000000018ee32B60 OBJC_Exception_throw + 88 2 Foundation
0x0000000190696a78 -[NSCalendardate initWithCoder:] + 0 3 Appkit
0x00000001937e5290 -[_ ncringareaaKvaaaAkvasions5290 -[_ ncringareaaKvasions5290 -[_ ncringareaaKvalaaAnta removeTrackingRect:]
200 4 libglass.dylib 0x000000012070ef7c Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 3456 5
libglass.dylib 0x0000000120714074
RemotelayerHoStremoteidinLocal + 3620 6 Appkit
0x0000000192F8617C -[NSView SetFrame:] + 300 7 libglass.dylib
0x00000001207140D4 RemotelayerhoStREMOTEMOTIDIDICICICLOCA + 37140D4 RemotelayerhoStreemothoStelhoStelhoStelhoStelhoStelhoStel -BR />
0x00000001207140D4
0x0000000192f92b88 -[NSView resizeWithOldSuperviewSize:] + 488 9
AppKit 0x0000000192f92524 -[NSView
resizeSubviewsWithOldSize:] + 360 10 AppKit
0x0000000192f789ac -[NSView setFrameSize:] + 948 11 AppKit
0x0000000192f8617c -[NSView setFrame:] + 300 12 AppKit
0x0000000192f92b88 -[NSView resizeWithOldSuperviewSize:] + 488 13
AppKit 0x0000000192F92524 -[NSView
RESSIZEUBViewWithholdSize:] + 360 14 Appkit
0x0000000192F789AC -[NSView SetFramesize:] + 948 15 appkit
0x0000000192f9167C -[NSTHMEFRAMEMFRAME -[NSVIEWMUSPRAME). setFramesize:] + 244 16 Appkit
0x0000000192F90Fe4 -[Nswindow _oldSplopeWindow: FromServer:] + 532 17
appkit 0x0000000192f90458 -[NSWindow
_ SetFram. libglass.dylib 0x000000012071f0c4 java_com_sun_glass_ui_mac_macwindow__1setBounds2 +
416 19 ??? 0x0000000111fe8fd4 0x0 +
4596862932 20 ??? 0x0000000111fe5110
0x0 + 4596846864 ... 42 ???
0x0000000111fe56b0 0x0 + 4596848304 43? />
0x000000010163dd60
_ Zn9javacalls11call_helperep9javaValUERK12MethodHandlep17javacallargumentssp10javathead < /li>
600 45 45 45 45 45 45 45 45 45 LibjvM. _Zl20jni_invoke_nonstaticp7jnienv_p9javaValUep8_JObject11JnicallTyp10_JMethodidp18Jni_ArgumentPusherp10Javathead < /li>
644 46 libjvm.dylib 0x000000010169da28 jni_callvoidMethod + 212 47 libglass.dylib
0x000000012070A998 JNI_onload + 204 48 Foundation
0x0000000190601f74 __nsThreadPerformPorpherpent + 264 49 Corefoundation
0x000000000 × 2F2F24 49 49 Corefoundation
0x000000000 ub2f2F24 49 49 Corefoundation
0x000000000 ub2f2f24 49 49 Corefoundation
0x000000 × ub2f2F24 49 49 Corefoundation
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 50 CoreFoundation 0x000000018f2fcd78
__CFRunLoopDoSource0 + 172 51 CoreFoundation 0x000000018f2fcae4 __CFRunLoopDoSources0 + 232 52 CoreFoundation
0x000000018f2fb738 __cfrunlooprun + 840 53 CoreFoundation
0x000000018F2FAD68 CFrunlooprunspecific + 572 54 Hitoolbox
0x000000019aArtlouTlooUtLouTrouTlooUp27C -Runentlokent27C: 324 55 Hitoolbox
0x000000019aaae4e8 recivePeventCommon + 676 56 Hitoolbox
0x000000019AC39484 _BLOCKUNTILNEXTMATCHINGISTISTISTISTISTISTISTISTISTICTION (BR /> 76 57 appkit 0x00000192filter +
76 57 appkit 0x00000192 /> _ DpsNexevent + 684 58 Appkit 0x00000001938eACD4 -[NSApplication (NSEVENVROUTING)
_ NexTEventMatchingEventMask: Untildate: Inmode: DEQUEUE:] + 688 59 Appkit 0x0000 000192f40c64 -[NsAnta -appkit 0x0000 $]] 60 libglass.dylib 0x000000012070cb20
JNI_OnLoad + 8788 61 Foundation
0x0000000190601f74 __NSThreadPerformPerform + 264 62 CoreFoundation
0x000000018f2fcde4
cfrunloop_is_calling_out_to_a_source0_perform_function < /strong> + 28 63 CoreFoundation 0x000000018f2fcd78
__ cfrunloopdosource0 + 172 64 CoreFoundation 0x000000018000180001800018000180001800018000180001800018000180001800018 __cfrunloopation0 + 23222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222- 222222222f2f2f2fcae4 __cffoLouca CoreFoundation
0x000000018f2fb738 __CFRunLoopRun + 840 66 CoreFoundation
0x000000018f2fad68 CFRunLoopRunSpecific + 572 67 libjli.dylib
0x000000010015726c Createexexexecutenvironment + 400 68 libjli.dylib
0x0000000100153344 JLI_LAUNCH + 1128 69 JAVA
0x0000000100117bac Main + 392 70 Dylld
0x000000018ee72B4C. LIBC ++ ABI: Beenden durch
ungewöhnliche Ausnahme von Typ nsexception < /li>
< /ul>
< /blockquote>
Der Fehler, der besagt, dass die Versionen nicht übereinstimmen, aber das Programm funktioniert gut. Ich habe versucht, Primärstage zu entfernen. Hier ist die Hauptklasse. Ich habe nur eine andere Datei mit Controllern usw. < /p>
Code: Select all
package com.example.bingespice_app;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("Homepage.fxml"));
Scene scene = new Scene(root);
// Set a default size before maximizing
primaryStage.setWidth(1280);
primaryStage.setHeight(720);
// Optional: center the window before maximizing
primaryStage.centerOnScreen();
// Add listener to handle when maximized is changed
primaryStage.maximizedProperty().addListener((obs, wasMaximized, isNowMaximized) -> {
if (isNowMaximized) {
// You can check screen bounds and ensure it doesn't exceed a max
javafx.geometry.Rectangle2D screenBounds = javafx.stage.Screen.getPrimary().getVisualBounds();
if (screenBounds.getWidth() < 1280 || screenBounds.getHeight() < 720) {
// If the screen is too small, don't maximize; instead, set default size
primaryStage.setMaximized(false);
primaryStage.setWidth(1280);
primaryStage.setHeight(720);
primaryStage.centerOnScreen();
}
}
});
primaryStage.setScene(scene);
primaryStage.setMaximized(true);
primaryStage.show();
}
public static void main(String[] args) {
launch();
}
}