java.awt.Label.getText()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(294)

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

Label.getText介绍

暂无

代码示例

代码示例来源:origin: net.java.openjdk.cacio/cacio-shared

@Override
JLabel initSwingComponent() {
  Label label = getAWTComponent();
  JLabel swingLabel = new JLabel();
  swingLabel.setText(label.getText());
  swingLabel.setOpaque(true);
  return swingLabel;
}

代码示例来源:origin: net.imagej/ij

StringBuffer sb = new StringBuffer();
if (copyType == COPY_XY) {
  sb.append(labels[radius+1].getText()); sb.append(delim);
  sb.append(labels[(2*radius+2)*(radius+1)].getText()); sb.append('\n');
} else if (copyType == COPY_HEADER) {
  for (int x=0; x<size; x++,p++) {
    sb.append(delim);
    sb.append(labels[p].getText());
for (int y=0; y<size; y++) {
  if (copyType == COPY_HEADER) {
    sb.append(labels[p].getText()); sb.append(delim);
    if (x > 0)
      sb.append(delim);
    sb.append(labels[p].getText());

代码示例来源:origin: imagej/ImageJA

StringBuffer sb = new StringBuffer();
if (copyType == COPY_XY) {
  sb.append(labels[radius+1].getText()); sb.append(delim);
  sb.append(labels[(2*radius+2)*(radius+1)].getText()); sb.append('\n');
} else if (copyType == COPY_HEADER) {
  for (int x=0; x<size; x++,p++) {
    sb.append(delim);
    sb.append(labels[p].getText());
for (int y=0; y<size; y++) {
  if (copyType == COPY_HEADER) {
    sb.append(labels[p].getText()); sb.append(delim);
    if (x > 0)
      sb.append(delim);
    sb.append(labels[p].getText());

代码示例来源:origin: org.jacorb/jacorb

public void _setName(String str) {
poaName = str;
setTitle(poaName+" Monitor ("+_getStateLabel().getText()+")");
}
public void _setPolicyIdAssignment(String str) {

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

public static String getText(final Component c) {
  if (c instanceof AbstractButton) {
    return ComponentTester.stripHTML(((AbstractButton)c).getText());
  }
  else if (c instanceof JLabel) {
    return ComponentTester.stripHTML(((JLabel)c).getText());
  }
  else if (c instanceof Label) {
    return ((Label)c).getText();
  }
  return null;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

descStr.append(": ").append(((JPopupMenu) c).getLabel());
} else if (c instanceof Label) {
  descStr.append(": ").append(((Label) c).getText());
} else if (c instanceof Button) {
  descStr.append(": ").append(((Button) c).getLabel());

代码示例来源:origin: MegaMek/megamek

FileDialog fd = new FileDialog(this, "Load Board...", FileDialog.LOAD);
fd.setDirectory("data" + File.separator + "boards");
if (boardName.getText().length() > 0) {
  fd.setFile(boardName.getText());

代码示例来源:origin: com.stevesoft.pat/pat

public Object clone() {
 TestGroup t = new TestGroup(lab.getText(),txt.isEditable());
 t.txt = new TextField();
 t.txt.setText(txt.getText());
 t.ctxt = (ColorText)ctxt.clone();
 return t;
}
public TestGroup(String s,boolean b) {

代码示例来源:origin: stackoverflow.com

button.setBounds(40, 35, 50, 50);
label.addPropertyChangeListener(label.getText(), new PropertyChangeListener() {
  @Override
  public void propertyChange(PropertyChangeEvent evt) {
  @Override
  public void mouseClicked(MouseEvent e) {
    int value = Integer.parseInt(label.getText());
    label.setText(String.valueOf(value + 1));

代码示例来源:origin: stackoverflow.com

String str = lbl.getText();
if (str.equals("Roseindia.net")){
lbl.setText("You have clicke the button.");

代码示例来源:origin: org.jacorb/jacorb

items[i]._getSecondLabel().setText(helpStr);
helpInt = _fontMetrics1().stringWidth(items[i]._getFirstLabel().getText());
if (helpInt > firstMax) firstMax = helpInt;
helpInt = _fontMetrics1().stringWidth(items[i]._getSecondLabel().getText());
if (helpInt > secondMax) secondMax = helpInt;

代码示例来源:origin: org.jacorb/jacorb

items[i]._getSecondLabel().setText(data[i].second);
helpInt = _fontMetrics1().stringWidth(items[i]._getFirstLabel().getText());
if (helpInt > firstMax) firstMax = helpInt;
helpInt = _fontMetrics1().stringWidth(items[i]._getSecondLabel().getText());
if (helpInt > secondMax) secondMax = helpInt;

相关文章