javax.swing.JPanel.getPreferredSize()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(237)

本文整理了Java中javax.swing.JPanel.getPreferredSize()方法的一些代码示例,展示了JPanel.getPreferredSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.getPreferredSize()方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:getPreferredSize

JPanel.getPreferredSize介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    Dimension size = super.getPreferredSize();
    size.width = 75;
    size.height = 26;
    return size;
  }
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 10;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    Dimension size = super.getPreferredSize();
    size.width = 52;
    return size;
  }
};

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 10;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 75;
  size.height = 26;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 10;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 75;
  size.height = 26;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    Dimension size = super.getPreferredSize();
    size.width = 52;
    return size;
  }
};

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    Dimension size = super.getPreferredSize();
    size.width = 75;
    size.height = 26;
    return size;
  }
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 150;
  size.height = 26;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    Dimension size = super.getPreferredSize();
    size.width = 52;
    return size;
  }
};

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 150;
  size.height = 26;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    Dimension size = super.getPreferredSize();
    size.width = 52;
    return size;
  }
};

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
  Dimension size = super.getPreferredSize();
  size.width = 10;
  return size;
}

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    // Keep glyphCachePanel width from ever going down so the CanvasGameContainer doesn't change sizes and flicker.
    Dimension size = super.getPreferredSize();
    maxWidth = Math.max(maxWidth, size.width);
    size.width = maxWidth;
    return size;
  }
};

代码示例来源:origin: libgdx/libgdx

public Dimension getPreferredSize () {
    // Keep glyphCachePanel width from ever going down so the CanvasGameContainer doesn't change sizes and flicker.
    Dimension size = super.getPreferredSize();
    maxWidth = Math.max(maxWidth, size.width);
    size.width = maxWidth;
    return size;
  }
};

代码示例来源:origin: runelite/runelite

@Override
public Dimension getPreferredSize()
{
  return super.getPreferredSize();
}

代码示例来源:origin: libgdx/libgdx

@Override
  public Dimension getPreferredSize () {
    Dimension dimension = super.getPreferredSize();
    if(image != null){
      dimension.width = image.getWidth();
      dimension.height = image.getHeight();
    }
    return dimension;
  }
}

代码示例来源:origin: libgdx/libgdx

@Override
  public Dimension getPreferredSize () {
    Dimension dimension = super.getPreferredSize();
    if(image != null){
      dimension.width = image.getWidth();
      dimension.height = image.getHeight();
    }
    return dimension;
  }
}

代码示例来源:origin: runelite/runelite

@Override
public Dimension getPreferredSize()
{
  return new Dimension(PANEL_WIDTH, super.getPreferredSize().height);
}

相关文章

JPanel类方法