javax.swing.JApplet.getParameter()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(126)

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

JApplet.getParameter介绍

暂无

代码示例

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Same as <code>Applet.getParameter()</code> but doesn't throw a
 * NullPointerException when used without an Applet context.
 */
public String getParameter(String name, String defaultValue) {
  try {
    String value = super.getParameter(name);
    return (value == null) ? defaultValue : value;
  } catch (NullPointerException e) {
    return defaultValue;
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Same as <code>Applet.getParameter()</code> but doesn't throw a
 * NullPointerException when used without an Applet context.
 */
@Override
public String getParameter(String name) {
  try {
    return super.getParameter(name);
  } catch (NullPointerException e) {
    return null;
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * We override getParameter() to make it work even if we have no Applet
 * context.
 */
@Override
public String getParameter(String name) {
  try {
    return super.getParameter(name);
  } catch (NullPointerException e) {
    return null;
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * We override getParameter() to make it work even if we have no Applet
 * context.
 */
@Override
public String getParameter(String name) {
  try {
    return super.getParameter(name);
  } catch (NullPointerException e) {
    return null;
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * We override getParameter() to make it work even if we have no Applet
 * context.
 */
@Override
public String getParameter(String name) {
  try {
    return super.getParameter(name);
  } catch (NullPointerException e) {
    return null;
  }
}

代码示例来源:origin: org.opencadc/cadc-app-kit

private void readParameters()
{
  String s;
  s = applet.getParameter("width");
  int w = Toolkit.toInt(s, 300);
  s = applet.getParameter("height");
  int h = Toolkit.toInt(s, 300);
  applet.setSize(w,h);
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInEDT
@Nullable private static String parameter(final @Nonnull JApplet applet, final @Nullable String parameterName) {
 return execute(() -> applet.getParameter(parameterName));
}

相关文章