< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Choice.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 150,160 ****
jint y = env->GetIntField(target, AwtComponent::yID);
jint width = env->GetIntField(target, AwtComponent::widthID);
jint height = env->GetIntField(target, AwtComponent::heightID);
jobject dimension = JNU_CallMethodByName(env, NULL, peer,
! "preferredSize",
"()Ljava/awt/Dimension;").l;
DASSERT(!safe_ExceptionOccurred(env));
if (env->ExceptionCheck()) goto done;
if (dimension != NULL && width == 0) {
--- 150,160 ----
jint y = env->GetIntField(target, AwtComponent::yID);
jint width = env->GetIntField(target, AwtComponent::widthID);
jint height = env->GetIntField(target, AwtComponent::heightID);
jobject dimension = JNU_CallMethodByName(env, NULL, peer,
! "getPreferredSize",
"()Ljava/awt/Dimension;").l;
DASSERT(!safe_ExceptionOccurred(env));
if (env->ExceptionCheck()) goto done;
if (dimension != NULL && width == 0) {
*** 332,342 ****
}
jobject AwtChoice::PreferredItemSize(JNIEnv *env)
{
jobject dimension = JNU_CallMethodByName(env, NULL, GetPeer(env),
! "preferredSize",
"()Ljava/awt/Dimension;").l;
DASSERT(!safe_ExceptionOccurred(env));
CHECK_NULL_RETURN(dimension, NULL);
/* This size is window size of choice and it's too big for each
--- 332,342 ----
}
jobject AwtChoice::PreferredItemSize(JNIEnv *env)
{
jobject dimension = JNU_CallMethodByName(env, NULL, GetPeer(env),
! "getPreferredSize",
"()Ljava/awt/Dimension;").l;
DASSERT(!safe_ExceptionOccurred(env));
CHECK_NULL_RETURN(dimension, NULL);
/* This size is window size of choice and it's too big for each
< prev index next >