JDK-8046008 : [macosx] Upper limit of any swing frames in Mac OS 10.7.5 is 1024 both height/width
  • Type: Bug
  • Component: client-libs
  • Affected Version: 7u40,8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2014-06-03
  • Updated: 2014-06-23
  • Resolved: 2014-06-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
JDK-7u40 or later produce the bug.
JDK-7u25 or earlier work fine.

ADDITIONAL OS VERSION INFORMATION :
Mac OS 10.7.5

EXTRA RELEVANT SYSTEM CONFIGURATION :
*Only occurs on machines running this version of the OS, any later/earlier OS seem to run fine.

A DESCRIPTION OF THE PROBLEM :
In the specific instance where Mac OS cannot upgrade later than 10.7.5, 
and is running JDK-7u40 or later; Swing GUI windows will have an upper limit resolution of 1024px  for bot width/height. 

While debugging, changing the JDK to any earlier versions JDK-7u25 or earlier the bug cannot be reproduced.

I'm gathering the bug was introduced in the delta between 7u25 and 7u40.

The matter has been discussed in both of these threads:

https://community.oracle.com/thread/2617106
&
https://netbeans.org/bugzilla/show_bug.cgi?id=237368

REGRESSION.  Last worked in version 7u25

ADDITIONAL REGRESSION INFORMATION: 
JDK-7u40

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The output should be, in both scenarios (dependant on screen resolution set to 1280x800):

gc = CGLGraphicsConfig[dev=69670592,pixfmt=0]
gc.widht = 1280
gc.height = 800
OGLMaxTextureSize = 2048
ACTUAL -
JDK 1.7.0_25:

   java version "1.7.0_25"
   Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
   Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

   gc = CGLGraphicsConfig[dev=69670592,pixfmt=0]
   gc.widht = 1280
   gc.height = 800
   OGLMaxTextureSize = 2048

JDK 1.7.0_45:

    java version "1.7.0_45"
    Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

    gc = CGLGraphicsConfig[dev=69670592,pixfmt=0]
    gc.widht = 1024
    gc.height = 1024
    OGLMaxTextureSize = 2048

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Please run the code below on jdk7u25/jdk7u40 to see results:

import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.lang.reflect.InvocationTargetException;
import java.util.logging.Level;
import java.util.logging.Logger;
import sun.java2d.opengl.CGLGraphicsConfig;

public final class test {

    public static void main(final String[] args) throws Exception {

        GraphicsDevice[] screenDevices
                = GraphicsEnvironment.getLocalGraphicsEnvironment()
                .getScreenDevices();
        for (GraphicsDevice screenDevice : screenDevices) {
            GraphicsConfiguration gcs[] = screenDevice.getConfigurations();
            for (GraphicsConfiguration gc1 : gcs) {
                CGLGraphicsConfig gc = (CGLGraphicsConfig) gc1;
                System.out.println("gc = " + gc);
                System.out.println("gc.widht = " + gc.getMaxTextureWidth());
                System.out.println("gc.height = " + gc.getMaxTextureHeight());

                java.lang.reflect.Method method;
                method = gc.getClass().getDeclaredMethod("_getMaxTextureSize");
                method.setAccessible(true);
                System.out.println("OGLMaxTextureSize = " + method.invoke(new Object[0]));
            }
        }
    }
}


This is Mac OS 10.7.5 specific, code copied from: https://netbeans.org/bugzilla/show_bug.cgi?id=237368
---------- END SOURCE ----------