本文整理了Java中javax.swing.JApplet.getParameter()
方法的一些代码示例,展示了JApplet.getParameter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JApplet.getParameter()
方法的具体详情如下:
包路径:javax.swing.JApplet
类名称: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));
}
内容来源于网络,如有侵权,请联系作者删除!