本文整理了Java中javax.swing.JLabel.setAutoscrolls()
方法的一些代码示例,展示了JLabel.setAutoscrolls()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLabel.setAutoscrolls()
方法的具体详情如下:
包路径:javax.swing.JLabel
类名称:JLabel
方法名:setAutoscrolls
暂无
代码示例来源:origin: org.apache.geronimo.daytrader.modules/wsappclient
/**
* This method initializes jLabel3
*
* @return JLabel
*/
private JLabel getJLabel3() {
if (jLabel3 == null) {
jLabel3 = new JLabel();
jLabel3.setBounds(212, 13, 87, 63);
jLabel3.setText(
"<html> Web Services Benchmark Scenario Application");
jLabel3.setAutoscrolls(true);
jLabel3.setFont(new java.awt.Font("sansserif", 1, 12));
jLabel3.setHorizontalAlignment(SwingConstants.CENTER);
}
return jLabel3;
}
/**
代码示例来源:origin: org.apache.geronimo.daytrader/daytrader-wsappclient
/**
* This method initializes jLabel3
*
* @return JLabel
*/
private JLabel getJLabel3() {
if (jLabel3 == null) {
jLabel3 = new JLabel();
jLabel3.setBounds(212, 13, 87, 63);
jLabel3.setText(
"<html> Web Services Benchmark Scenario Application");
jLabel3.setAutoscrolls(true);
jLabel3.setFont(new java.awt.Font("sansserif", 1, 12));
jLabel3.setHorizontalAlignment(SwingConstants.CENTER);
}
return jLabel3;
}
/**
代码示例来源:origin: org.apache.geronimo.samples.daytrader.modules/wsappclient
/**
* This method initializes jLabel3
*
* @return JLabel
*/
private JLabel getJLabel3() {
if (jLabel3 == null) {
jLabel3 = new JLabel();
jLabel3.setBounds(212, 13, 87, 63);
jLabel3.setText(
"<html> Web Services Benchmark Scenario Application");
jLabel3.setAutoscrolls(true);
jLabel3.setFont(new java.awt.Font("sansserif", 1, 12));
jLabel3.setHorizontalAlignment(SwingConstants.CENTER);
}
return jLabel3;
}
/**
代码示例来源:origin: stackoverflow.com
try {
map = new JLabel(new ImageIcon(ImageIO.read(new File("c:/treasuremap.jpg"))));
map.setAutoscrolls(true);
add(new JScrollPane(map));
代码示例来源:origin: freeplane/freeplane
private JComponent createDetails(final AddOnProperties addOn) {
final StringBuilder text = new StringBuilder(1024);
text.append("<html><body>");
text.append(toHtml(addOn.getDescription()));
text.append("<p>");
if (addOn instanceof ScriptAddOnProperties) {
List<Script> scripts = ((ScriptAddOnProperties) addOn).getScripts();
if (!scripts.isEmpty()) {
text.append("<table border='1'>");
text.append(row("th", getText("header.function"), getText("header.menu"), getText("header.shortcut")));
for (ScriptAddOnProperties.Script script : scripts) {
text.append(row("td", bold(TextUtils.getText(script.menuTitleKey)), HtmlUtils.toXMLEscapedText(formatMenuLocation(script)),
formatShortcut(script)));
}
text.append("</table>");
}
}
text.append("</body></html>");
final JLabel label = new JLabel(text.toString());
label.setAutoscrolls(true);
final Icon icon = IconNotFound.createIconOrReturnNull(addOn.getName() + "-screenshot-1.png");
if (icon != null)
label.setIcon(icon);
return label;
}
代码示例来源:origin: org.codehaus.izpack/izpack-installer
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column)
{
JComponent comp = null;
ConditionHistory conditionHistory = (ConditionHistory) value;
JLabel label = new JLabel();
label.setAutoscrolls(true);
comp = label;
label.setText(conditionHistory.toString());
comp.setOpaque(true);
if (conditionHistory.isNewcondition())
{
comp.setBackground(Color.green);
}
else if (conditionHistory.isChangedcondition())
{
comp.setBackground(Color.yellow);
}
return comp;
}
代码示例来源:origin: org.codehaus.izpack/izpack-installer
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column)
{
JComponent comp = null;
VariableHistory variableHistory = (VariableHistory) value;
JLabel label = new JLabel();
label.setAutoscrolls(true);
comp = label;
label.setText(variableHistory.getLastValue());
comp.setOpaque(true);
if (variableHistory.isNewvariable())
{
comp.setBackground(Color.green);
}
else if (variableHistory.isChanged())
{
comp.setBackground(Color.yellow);
}
return comp;
}
内容来源于网络,如有侵权,请联系作者删除!