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

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

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

Label.setSize介绍

暂无

代码示例

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

public UserInfoDialog(Frame parent) {
  super(parent, "Input", true);
  setLayout(null);
  l.setFont(default_font);
  l.setSize(50, 30);
  l.setLocation(30, 50);
  name.setFont(default_font);
  name.setSize(150, 30);
  name.setLocation(90, 50);
  //name.selectAll();
  ok.setFont(default_font);
  ok.setSize(50, 30);
  ok.setLocation(30, 90);

  add(l);    add(name); add(ok);
  ok.addActionListener(this);
  setSize(300, 150);
  Point my_loc=parent.getLocation();
  my_loc.x+=50;
  my_loc.y+=150;
  setLocation(my_loc);
  show();
}

代码示例来源:origin: IanDarwin/javasrc

public static void main(String[] av) {
  JFrame f = new JFrame("Mouse Dragger");
  Container cp = f.getContentPane();
  Image im = Toolkit.getDefaultToolkit().getImage(
      av.length == 1 ? av[0] : "graphics/duke.gif");
  // create a MouseDrag object
  MouseDrag j = new MouseDrag(im);
  cp.setLayout(new BorderLayout());
  cp.add(BorderLayout.NORTH,
    new Label("Hello, and welcome to the world of Java"));
  cp.add(BorderLayout.CENTER, j);
  cp.add(BorderLayout.SOUTH, j.status = new Label());
  j.status.setSize(
      f.getSize().width, j.status.getSize().height);
  f.setSize(300, 300);
  f.setVisible(true);
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

代码示例来源:origin: IanDarwin/javasrc

public static void main(String[] av) {
  JFrame f = new JFrame("Mouse Dragger");
  Container cp = f.getContentPane();
  if (av.length < 1) {
    System.err.println("Usage: MouseDragClip imagefile");
    System.exit(1);
  }
  Image im = Toolkit.getDefaultToolkit().getImage(av[0]);
  // create a MouseDragClip object
  MouseDragClip j = new MouseDragClip(im);
  cp.setLayout(new BorderLayout());
  cp.add(BorderLayout.NORTH,
    new Label("Hello, and welcome to the world of Java"));
  cp.add(BorderLayout.CENTER, j);
  cp.add(BorderLayout.SOUTH, status = new Label());
  status.setSize(f.getSize().width, status.getSize().height);
  f.pack();
  f.setVisible(true);
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

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

void _setWidth(int w1, int w2) {
getRequestLabel().setSize(w1, 13);
getObjectLabel().setBounds(20+w1, 0, 1200-(w1+20), 13);
}
/**

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

void _setWidth(int w1, int w2) {
getObjectLabel().setSize(w1, 13);
getServantLabel().setBounds(20+w1, 0, 1200-(w1+20), 13);
  /*	
      init_width2 = curr_width2 = w2;
      init_width = curr_width = 10+w1+10+w2+10    +500;
      setSize(init_width, 15);
      getInnerPanel().setSize(init_width, 13);
      getObjectLabel().setSize(w1, 13);    
      getServantLabel().setBounds(20+w1, 0, w2    +500, 13);
  */	
}
/**

代码示例来源:origin: IanDarwin/javasrc

/** Construct the GUI for an Applet Status window */
AppletAdapter() {
  super();
  // Must do this very early on, since the Applet's
  // Constructor or its init() may use showStatus()
  add(status = new Label());
  // Give "status" the full width
  status.setSize(getSize().width, status.getSize().height);
  showStatus("AppletAdapter constructed");	// now it can be said
}

代码示例来源:origin: org.processing/core

label.setSize(labelSize);
label.setLocation(20, screenRect.height - labelSize.height - 20);

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

public void _setSize(int w1, int w2) {
  int width1 = w1 < 100 ? 100 : w1;
  int width2 = w2 < 100 ? 100 : w2;
  
  init_width_wp = curr_width_wp = 10+width1+10+width2+10;
  init_width = curr_width = init_width_wp +12;
  
  setSize(init_width, 400);
  getWorkPanel().setSize(init_width - 12, 0);
  getHeaderPanel()._getHeaderLabel1().setSize(width1, 20);
  getHeaderPanel()._getHeaderLabel2().setBounds(20+width1, 0, width2, 20);
}
/**

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

/**
 * Return the Label1 property value.
 * @return java.awt.Label
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Label getLabel1() {
if (ivjLabel1 == null) {
    try {
      ivjLabel1 = new java.awt.Label();
      ivjLabel1.setName("Label1");
      ivjLabel1.setLocation(10, 10);
      ivjLabel1.setText("Queue");
      ivjLabel1.setBackground(java.awt.SystemColor.control);
      ivjLabel1.setSize(70, 12);
      ivjLabel1.setForeground(java.awt.Color.black);
      ivjLabel1.setFont(new java.awt.Font("dialog", 2, 10));
      ivjLabel1.setAlignment(1);
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
};
return ivjLabel1;
}
/**

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

/**
 * Return the Label1 property value.
 * @return java.awt.Label
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Label getLabel1() {
if (ivjLabel1 == null) {
    try {
      ivjLabel1 = new java.awt.Label();
      ivjLabel1.setName("Label1");
      ivjLabel1.setLocation(10, 10);
      ivjLabel1.setText("Active Object");
      ivjLabel1.setBackground(java.awt.SystemColor.control);
      ivjLabel1.setSize(70, 12);
      ivjLabel1.setForeground(java.awt.Color.black);
      ivjLabel1.setFont(new java.awt.Font("dialog", 2, 10));
      ivjLabel1.setAlignment(1);
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
};
return ivjLabel1;
}
/**

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

/**
 * Return the Label2 property value.
 * @return java.awt.Label
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Label getLabel2() {
if (ivjLabel2 == null) {
    try {
      ivjLabel2 = new java.awt.Label();
      ivjLabel2.setName("Label2");
      ivjLabel2.setLocation(10, 22);
      ivjLabel2.setText("Map");
      ivjLabel2.setBackground(java.awt.SystemColor.control);
      ivjLabel2.setSize(70, 12);
      ivjLabel2.setForeground(java.awt.Color.black);
      ivjLabel2.setFont(new java.awt.Font("dialog", 2, 10));
      ivjLabel2.setAlignment(1);
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
};
return ivjLabel2;
}
/**

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

/**
 * Return the Label2 property value.
 * @return java.awt.Label
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Label getLabel2() {
if (ivjLabel2 == null) {
    try {
      ivjLabel2 = new java.awt.Label();
      ivjLabel2.setName("Label2");
      ivjLabel2.setLocation(10, 22);
      ivjLabel2.setText("");
      ivjLabel2.setBackground(java.awt.SystemColor.control);
      ivjLabel2.setSize(70, 12);
      ivjLabel2.setForeground(java.awt.Color.black);
      ivjLabel2.setFont(new java.awt.Font("dialog", 2, 10));
      ivjLabel2.setAlignment(1);
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
};
return ivjLabel2;
}
FillLevelBar _getQueueBar() {

代码示例来源:origin: sc.fiji/Reconstruct_Reader

areaNameLabel.setSize(new Dimension(120, 240));
areaNameLabel.setPreferredSize(new Dimension(120, 240));

代码示例来源:origin: apache/activemq-artemis

public UserInfoDialog(Frame parent) {
  super(parent, "Input", true);
  setLayout(null);
  l.setFont(default_font);
  l.setSize(50, 30);
  l.setLocation(30, 50);
  name.setFont(default_font);
  name.setSize(150, 30);
  name.setLocation(90, 50);
  //name.selectAll();
  ok.setFont(default_font);
  ok.setSize(50, 30);
  ok.setLocation(30, 90);

  add(l);    add(name); add(ok);
  ok.addActionListener(this);
  setSize(300, 150);
  Point my_loc=parent.getLocation();
  my_loc.x+=50;
  my_loc.y+=150;
  setLocation(my_loc);
  show();
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

public UserInfoDialog(Frame parent) {
  super(parent, "Input", true);
  setLayout(null);
  l.setFont(default_font);
  l.setSize(50, 30);
  l.setLocation(30, 50);
  name.setFont(default_font);
  name.setSize(150, 30);
  name.setLocation(90, 50);
  //name.selectAll();
  ok.setFont(default_font);
  ok.setSize(50, 30);
  ok.setLocation(30, 90);

  add(l);    add(name); add(ok);
  ok.addActionListener(this);
  setSize(300, 150);
  Point my_loc=parent.getLocation();
  my_loc.x+=50;
  my_loc.y+=150;
  setLocation(my_loc);
  show();
}

代码示例来源:origin: apache/activemq-artemis

public UserInfoDialog(Frame parent) {
  super(parent, "Input", true);
  setLayout(null);
  l.setFont(default_font);
  l.setSize(50, 30);
  l.setLocation(30, 50);
  name.setFont(default_font);
  name.setSize(150, 30);
  name.setLocation(90, 50);
  //name.selectAll();
  ok.setFont(default_font);
  ok.setSize(50, 30);
  ok.setLocation(30, 90);

  add(l);    add(name); add(ok);
  ok.addActionListener(this);
  setSize(300, 150);
  Point my_loc=parent.getLocation();
  my_loc.x+=50;
  my_loc.y+=150;
  setLocation(my_loc);
  show();
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

public UserInfoDialog(Frame parent) {
super(parent, "Input", true);
setLayout(null);
l.setFont(default_font);
l.setSize(50, 30);
l.setLocation(30, 50);
name.setFont(default_font);
name.setSize(150, 30);
name.setLocation(90, 50);
//name.selectAll();
ok.setFont(default_font);
ok.setSize(50, 30);
ok.setLocation(30, 90);

add(l);    add(name); add(ok);
ok.addActionListener(this);
setSize(300, 150);
Point my_loc=parent.getLocation();
my_loc.x+=50;
my_loc.y+=150;
setLocation(my_loc);
show();
}

代码示例来源:origin: com.bbossgroups.rpc/bboss-rpc

public UserInfoDialog(Frame parent) {
super(parent, "Input", true);
setLayout(null);
l.setFont(default_font);
l.setSize(50, 30);
l.setLocation(30, 50);
name.setFont(default_font);
name.setSize(150, 30);
name.setLocation(90, 50);
//name.selectAll();
ok.setFont(default_font);
ok.setSize(50, 30);
ok.setLocation(30, 90);

add(l);    add(name); add(ok);
ok.addActionListener(this);
setSize(300, 150);
Point my_loc=parent.getLocation();
my_loc.x+=50;
my_loc.y+=150;
setLocation(my_loc);
show();
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public UserInfoDialog(Frame parent) {
  super(parent, "Input", true);
  setLayout(null);
  l.setFont(default_font);
  l.setSize(50, 30);
  l.setLocation(30, 50);
  name.setFont(default_font);
  name.setSize(150, 30);
  name.setLocation(90, 50);
  //name.selectAll();
  ok.setFont(default_font);
  ok.setSize(50, 30);
  ok.setLocation(30, 90);

  add(l);    add(name); add(ok);
  ok.addActionListener(this);
  setSize(300, 150);
  Point my_loc=parent.getLocation();
  my_loc.x+=50;
  my_loc.y+=150;
  setLocation(my_loc);
  show();
}

相关文章