When creating an AWT Frame
in a Java program running on MacOS, the maximize button in the frame's title bar maximises the window:
public static void main(String args[]) {
new Frame();
}
When I create a Swing JFrame
instance instead, the same button toggles the window into fullscreen mode, which is the standard behaviour on MacOS. The button even looks different visually when I hover over it:
public static void main(String args[]) {
new JFrame();
}
Is there any way how I can replicate JFrame's "maximize to fullscreen" behaviour with AWT's Frame? I scanned the code of the entire JFrame class and wasn't able to identify any logic that would toggle the Frame's behaviour in such a way.