Java Code Examples for javax.swing.JLabel.LEFT

The following are Jave code examples for showing how to use LEFT of the javax.swing.JLabel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: JavaMinicap   File: DrawImageThread.java   View Source Code Vote up 6 votes
public DrawImageThread(String serial, int port, JPanel parPanel){
	this.serial = serial;
	this.port = port;
	
	this.drawArea = new DrawCanvas();
	this.drawArea.setPreferredSize(new Dimension(MainFrame.AREA_WIDTH, MainFrame.AREA_HEIGHT));
	parPanel.setLayout(new BorderLayout());
	parPanel.add(this.drawArea, BorderLayout.CENTER);
	JPanel jpBotinfo = new JPanel();
	jpBotinfo.setLayout(new GridLayout(2,1));
	JLabel jlPort = new JLabel("pc端口号:"+new Integer(this.port).toString(), JLabel.LEFT);
	jpBotinfo.add(jlPort);
	JLabel jlSerial = new JLabel("设备号:"+this.serial, JLabel.LEFT);
	jpBotinfo.add(jlSerial);
	parPanel.add(jpBotinfo, BorderLayout.SOUTH);

	parPanel.setBackground(new Color(255,255,255));
	//启动adb连接
	this.parser = new SelfParse(this.serial, this.port);
}
 
Example 2
Project: DeBrug   File: UitTeVoerenDialoog_EditorBuilder_a.java   View Source Code Vote up 6 votes
private JComponent _QueryFunction_JComponent_pjer6y_a0a0n0a() {

      JPanel panel = new JPanel();
      ImageIcon imageIcon = new ImageIcon();
      JLabel label = new JLabel(SPropertyOperations.getString(myNode, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")), imageIcon, JLabel.LEFT);
      JTextField textField = new JTextField();
      textField.setColumns(35);
      {
        final SNode uitTeVoerenDialoog = ListSequence.fromList(SModelOperations.nodes(SNodeOperations.getModel(myNode), MetaAdapterFactory.getConcept(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x77d59dfe8d9bbd90L, "Simulatie.structure.UitTeVoerenDialoog"))).first();
        if (SNodeOperations.isInstanceOf(uitTeVoerenDialoog, MetaAdapterFactory.getConcept(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x77d59dfe8d9bbd90L, "Simulatie.structure.UitTeVoerenDialoog"))) {
          SNode waarde = InstantieVanObject__BehaviorDescriptor.GeefWaardeVanKenmerk_idFR9FxGLp3H.invoke(SLinkOperations.getTarget(uitTeVoerenDialoog, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x77d59dfe8d9bbd90L, 0x690f11b6e01d86a4L, "onderwerp")), myNode);
          textField.setText(Waarde__BehaviorDescriptor.GeefWaardeString_idFzw$g_H4hz.invoke(waarde));
        }
      }
      panel.add(label);
      panel.add(textField);
      return panel;
    }
 
Example 3
Project: xdman   File: BrowserIntDlg.java   View Source Code Vote up 6 votes
void createChromePanel() {
	chromePanel = new JPanel(new BorderLayout());
	chromePanel.setBackground(Color.WHITE);
	JLabel lbl = new JLabel(XDMIconMap.getIcon("CI_ICON"), JLabel.LEFT);
	lbl.setBorder(new EmptyBorder(20, 20, 20, 20));
	chromePanel.add(lbl, BorderLayout.NORTH);
	JTextArea text3 = new JTextArea();
	text3.setBackground(bgColor);
	text3.setOpaque(false);
	text3.setWrapStyleWord(true);
	text3.setEditable(false);
	text3.setLineWrap(true);
	text3.setBorder(new EmptyBorder(0, 20, 20, 20));
	String txt = new File(System.getProperty("user.home"), "xdm-helper")
			.getAbsolutePath();
	text3.setText(StringResource.getString("BI_LBL_17").replace("<FOLDER>",
			txt));
	chromePanel.add(text3);
}
 
Example 4
Project: VISNode   File: NodeView.java   View Source Code Vote up 5 votes
/**
 * Build the label for the parameter
 *
 * @param text
 * @return JComponent
 */
private JComponent buildLabel(String text) {
    JLabel label = new JLabel(text, JLabel.LEFT);
    label.setBorder(new EmptyBorder(0, 15, 0, 0));
    label.setFont(new Font("Segoe UI", Font.PLAIN, 9));
    JPanel container = new JPanel(new BorderLayout(5, 0));
    container.add(label, BorderLayout.WEST);
    container.setAlignmentX(JLabel.LEFT_ALIGNMENT);
    container.setOpaque(false);
    return container;
}