当前位置: 首页>>代码示例>>Java>>正文


Java JTextField.setBounds方法代码示例

本文整理汇总了Java中javax.swing.JTextField.setBounds方法的典型用法代码示例。如果您正苦于以下问题:Java JTextField.setBounds方法的具体用法?Java JTextField.setBounds怎么用?Java JTextField.setBounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JTextField的用法示例。


在下文中一共展示了JTextField.setBounds方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WindowGame

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the frame.
 */
public WindowGame() {
	setIconImage(Toolkit.getDefaultToolkit().getImage(WindowGame.class.getResource("/resource/chip.png")));
	setTitle("\u6A4B\u724C123");
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setBounds(100, 100, 980, 500);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);
	
	textField = new JTextField();
	textField.setBounds(650, 422, 239, 29);
	contentPane.add(textField);
	textField.setColumns(10);
	
	JButton btnNewButton = new JButton("\u50B3\u9001");
	btnNewButton.setBounds(886, 422, 68, 29);
	contentPane.add(btnNewButton);
	
	JTextArea textArea = new JTextArea();
	textArea.setBounds(650, 0, 304, 423);
	contentPane.add(textArea);
}
 
开发者ID:aben20807,项目名称:bridgechat,代码行数:27,代码来源:WindowGame.java

示例2: setType

import javax.swing.JTextField; //导入方法依赖的package包/类
private void setType() {
    int locationPoint = 323;
    for (int i = 0; i < 3; i++) {

        roomTypes = new JTextField();
        roomTypes.setColumns(10);
        roomTypes.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
        roomTypes.setBounds(locationPoint, 97, 86, 20);
        roomTypes.setVisible(false);
        bottomPanel.add(roomTypes);

        roomTypeFields[i] = roomTypes;
        locationPoint = locationPoint + 96;
    }
}
 
开发者ID:Coder-ACJHP,项目名称:Hotel-Properties-Management-System,代码行数:16,代码来源:HotelPropertiesWindow.java

示例3: AddBreakPoint

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the frame.
 */
public AddBreakPoint(DefaultListModel<BreakPoint> breakpoint) {
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setBounds(100, 100, 450, 300);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);
	
	JComboBox<Object> comboBox = new JComboBox<Object>();
	comboBox.setModel(new DefaultComboBoxModel<Object>(Variable.values()));
	comboBox.setBounds(10, 115, 141, 20);
	contentPane.add(comboBox);
	
	textField = new JTextField();
	textField.setBounds(226, 115, 141, 20);
	contentPane.add(textField);
	textField.setColumns(10);
	
	JButton btnAddBreakpoint = new JButton("Add BreakPoint");
	btnAddBreakpoint.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent arg0) {
			Object val = null;
			String text = textField.getText().toLowerCase();
			if(text.equals("true"))
				val = true;
			else if(text.equals("false"))
				val = false;
			else{
				val = Integer.parseInt(text, 16);
			}
			breakpoint.addElement(new BreakPoint((Variable) comboBox.getSelectedItem(),val));
			setVisible(false);
			dispose();
		}
	});
	btnAddBreakpoint.setBounds(138, 191, 141, 23);
	contentPane.add(btnAddBreakpoint);
}
 
开发者ID:QuantumSoundings,项目名称:BassNES,代码行数:42,代码来源:AddBreakPoint.java

示例4: richiediNome

import javax.swing.JTextField; //导入方法依赖的package包/类
private void richiediNome() {
    nome = null;
    askNome = new JTextField();
    JButton askNomeButton = new JButton(caricaImmagine("dominio/immagini/fatto.png"));
    JLabel askNomeLabel = new JLabel(caricaImmagine("dominio/immagini/richiediNome.png"));
    ActionListener action_nome_inserito = new ActionListener(){
        @Override
        public void actionPerformed(ActionEvent e) {
            nome = askNome.getText();
        };
    };
        
    askNome.setFont(new Font("nome", 1, 40));
        
    askNome.setBounds(this.getWidth()/2 - 125, 300, 250, 80);
    askNomeButton.setBounds(this.getWidth()/2 - 100, 400, 200, 80);
    askNomeLabel.setBounds(this.getWidth()/2 - 200, 100, 400, 80);
    
    askNome.addActionListener(action_nome_inserito);  
    askNomeButton.addActionListener(action_nome_inserito);
        
    sfondo.add(askNome);
    sfondo.add(askNomeButton);
    sfondo.add(askNomeLabel);            
    sfondo.repaint();
    
    while(nome == null) {
        pausa(100);
    }
        
    sfondo.removeAll(); 
    sfondo.repaint();
        
    fireViewEvent(new SetNome(nome));
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-A,代码行数:36,代码来源:PartitaOfflineGuiView.java

示例5: Channel

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the frame to choose the channel
 */
public Channel() {
	this.setTitle("Chat IRC");
	this.setResizable(false);
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	this.setBounds(100, 100, 460, 261);
	this.setLocationRelativeTo(null);
	setIconImage(Toolkit.getDefaultToolkit().getImage(Channel.class.getResource("/image/swag.png")));
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);
	
	JButton btnOk = new JButton("OK");
	Icon imgOk = new ImageIcon(Toolkit.getDefaultToolkit().getImage(Channel.class.getResource("/image/ok.png")));
	btnOk.setIcon(imgOk);
	btnOk.setFont(new Font("Tahoma", Font.BOLD, 14));
	btnOk.addActionListener(new ChannelListener());
	btnOk.setBounds(164, 152, 104, 30);
	contentPane.add(btnOk);
	
	JLabel lblChannel = new JLabel("Channel");
	lblChannel.setHorizontalAlignment(SwingConstants.LEFT);
	lblChannel.setFont(new Font("Tahoma", Font.BOLD, 14));
	lblChannel.setBounds(187, 30, 72, 30);
	contentPane.add(lblChannel);
	
	textFieldChannel = new JTextField();
	textFieldChannel.setFont(new Font("Tahoma", Font.PLAIN, 14));
	textFieldChannel.setBounds(115, 85, 203, 30);
	contentPane.add(textFieldChannel);
	textFieldChannel.setColumns(10);
	
	this.addWindowListener( new WindowAdapter() {
		public void windowClosing(WindowEvent e) {
			closeFrame();
		}
	});
}
 
开发者ID:LittleSnake42,项目名称:java-irc,代码行数:42,代码来源:Channel.java

示例6: createProxyPanel

import javax.swing.JTextField; //导入方法依赖的package包/类
JPanel createProxyPanel() {
	JPanel panel = new JPanel();
	panel.setLayout(null);

	usePAC = new JCheckBox("Use Proxy Autoconfig Script");
	usePAC.setBounds(10, 10, 200, 20);
	txtPAC = new JTextField(30);
	txtPAC.setBounds(10, 40, 340, 20);
	panel.add(usePAC);
	panel.add(txtPAC);

	useProxy = new JCheckBox("Use Proxy Server");
	useProxy.setBounds(10, 90, 200, 20);
	txtProxy = new JTextField(30);
	txtProxy.setBounds(10, 120, 340, 20);
	panel.add(useProxy);
	panel.add(txtProxy);

	JLabel lbl1 = new JLabel("User Name");
	lbl1.setBounds(10, 180, 100, 20);
	txtProxyUser = new JTextField(30);
	txtProxyUser.setBounds(110, 180, 100, 20);
	panel.add(lbl1);
	panel.add(txtProxyUser);

	JLabel lbl2 = new JLabel("Password");
	lbl2.setBounds(10, 210, 100, 20);
	txtProxyPass = new JPasswordField(30);
	txtProxyPass.setBounds(110, 210, 100, 20);
	panel.add(lbl2);
	panel.add(txtProxyPass);

	// Box box = Box.createVerticalBox();
	// box.setOpaque(false);
	// box.setBorder(new EmptyBorder(10, 0, 0, 10));
	//
	// JPanel p = new JPanel(new GridLayout(4, 1, 5, 5));
	// p.setOpaque(false);
	//
	// Box b = Box.createVerticalBox();
	// usePAC = new JCheckBox("Use Proxy Autoconfig Script");
	// txtPAC = new JTextField(30);
	// b.add(usePAC);
	// b.add(txtPAC);
	// p.add(b);
	//
	// JButton http = new JButton(getString("HTTP_PROXY"));
	// http.setName("HTTP_PROXY");
	// http.addActionListener(this);
	// p.add(http);
	//
	// JButton https = new JButton(getString("HTTPS_PROXY"));
	// https.setName("HTTPS_PROXY");
	// https.addActionListener(this);
	// p.add(https);
	//
	// JButton ftp = new JButton(getString("FTP_PROXY"));
	// ftp.setName("FTP_PROXY");
	// ftp.addActionListener(this);
	// p.add(ftp);
	//
	// box.add(p);
	// box.add(Box.createVerticalGlue());

	return panel;

}
 
开发者ID:kmarius,项目名称:xdman,代码行数:68,代码来源:ConfigDialog.java

示例7: Main

import javax.swing.JTextField; //导入方法依赖的package包/类
public Main() {
	setTitle("Twitch Comment Talker");
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	ImageIcon icon = new ImageIcon("./icon.png");
    setIconImage(icon.getImage());
	setBounds(100, 100, 300, 248);
	setResizable(false);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);

	JLabel lblAuthPassword = new JLabel("OAuth Pass");
	lblAuthPassword.setBounds(12, 10, 86, 13);
	contentPane.add(lblAuthPassword);

	textAuthPassword = new JPasswordField();
	textAuthPassword.setBounds(110, 7, 172, 19);
	contentPane.add(textAuthPassword);
	textAuthPassword.setEchoChar('*');
	textAuthPassword.setColumns(10);
	textAuthPassword.setEditable(false);

	JLabel lblUserName = new JLabel("Channel Name");
	lblUserName.setBounds(12, 33, 86, 13);
	contentPane.add(lblUserName);

	textUserName = new JTextField();
	textUserName.setBounds(110, 30, 172, 19);
	contentPane.add(textUserName);
	textUserName.setColumns(10);
	textUserName.setToolTipText("https://www.twitch.tv/~~~の~~~部分をそのまま入力して下さい。");

	btnConnect.setBounds(8, 148, 276, 38);
	contentPane.add(btnConnect);
	btnConnect.addActionListener(this);
	btnConnect.setActionCommand("btnConnect");
	btnConnect.setToolTipText("Twitchコメントに接続します。");

	JLabel lblStatus = new JLabel("Status:");
	lblStatus.setBounds(12, 196, 43, 13);
	contentPane.add(lblStatus);

	lblStatus_1.setBounds(67, 196, 215, 13);
	contentPane.add(lblStatus_1);

	chkReadName.setBounds(8, 52, 264, 21);
	contentPane.add(chkReadName);
	chkReadName.addActionListener(this);
	chkReadName.setActionCommand("chkReadName");
	chkReadName.setToolTipText("コメント投稿者のユーザー名を読み上げます。");

	chkUseEnglish.setBounds(8, 75, 137, 21);
	contentPane.add(chkUseEnglish);
	chkUseEnglish.addActionListener(this);
	chkUseEnglish.setActionCommand("chkUseEnglish");
	chkUseEnglish.setToolTipText("英文が投稿された時、SAPI5で読み上げをします。");


	btnSAPI = new JButton(vapi.getVoice());
	btnSAPI.setBounds(153, 76, 129, 19);
	contentPane.add(btnSAPI);
	btnSAPI.addActionListener(this);
	btnSAPI.setActionCommand("btnSAPI");
	
	chkPopup.setBounds(8, 121, 137, 21);
	contentPane.add(chkPopup);
	chkPopup.addActionListener(this);
	chkPopup.setActionCommand("chkPopup");
	chkPopup.setToolTipText("コメント受信時に通知ポップアップを表示します。");
	
	chkReadEmote.setBounds(8, 98, 137, 21);
	contentPane.add(chkReadEmote);
	chkReadEmote.addActionListener(this);
	chkReadEmote.setActionCommand("chkReadEmote");
	chkReadEmote.setToolTipText("エモート語句を読み上げします。");

	loadConfigFile();
	
}
 
开发者ID:advancedbear,项目名称:TwitchBouyomi,代码行数:81,代码来源:Main.java

示例8: CollectionPanel

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the panel.
 */
public CollectionPanel() {
	setLayout(null);
	
	collection = new ArrayList<String>();
	
	txtSearch = new JTextField();
	txtSearch.setToolTipText("Search...");
	txtSearch.setBounds(208, 29, 278, 28);
	add(txtSearch);
	txtSearch.setColumns(100);
	
	btnSearch = new JButton("Search");
	btnSearch.setBounds(506, 30, 117, 29);
	add(btnSearch);
	
	JLabel lblSearch = new JLabel("Search:");
	lblSearch.setFont(new Font("Lucida Grande", Font.PLAIN, 25));
	lblSearch.setBounds(108, 23, 88, 31);
	add(lblSearch);
	
	btnCraft = new JButton("Craft");
	btnCraft.setBounds(245, 266, 117, 29);
	add(btnCraft);
	
	btnDust = new JButton("Dust");
	btnDust.setBounds(374, 266, 117, 29);
	add(btnDust);
	
	JScrollPane scrollPane = new JScrollPane();
	scrollPane.setBounds(23, 73, 646, 181);
	add(scrollPane);
	
	list = new JList<String>(collection_model);
	list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	scrollPane.setViewportView(list);
	
	btnBack = new JButton("Back");
	btnBack.setBounds(22, 266, 117, 29);
	add(btnBack);
	
	lblDust = new JLabel("Dust:");
	lblDust.setHorizontalAlignment(SwingConstants.TRAILING);
	lblDust.setBounds(563, 271, 106, 16);
	add(lblDust);
	
}
 
开发者ID:ikhaliq15,项目名称:JHearthstone,代码行数:50,代码来源:CollectionPanel.java

示例9: MakeDeckPanel

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the panel.
 */
public MakeDeckPanel() {
	setLayout(null);
	
	JLabel lblDecklist = new JLabel("Decklist: ");
	lblDecklist.setBounds(434, 6, 60, 16);
	add(lblDecklist);
	
	JLabel lblCollection = new JLabel("Collection:");
	lblCollection.setBounds(30, 22, 68, 16);
	add(lblCollection);
	
	btnDelete = new JButton("Delete");
	btnDelete.setBounds(434, 271, 117, 29);
	add(btnDelete);
	
	btnAdd = new JButton("Add");
	btnAdd.setBounds(213, 271, 117, 29);
	add(btnAdd);
	
	btnSave = new JButton("Save");
	btnSave.setBounds(547, 271, 117, 29);
	add(btnSave);
	
	JScrollPane scrollPane = new JScrollPane();
	scrollPane.setBounds(444, 34, 220, 235);
	add(scrollPane);
	
	deck_list = new JList<String>(model);
	deck_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	scrollPane.setViewportView(deck_list);
	
	JScrollPane scrollPane_1 = new JScrollPane();
	scrollPane_1.setBounds(30, 56, 377, 214);
	add(scrollPane_1);
	
	collection = new JList<String>(collection_model);
	collection.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	scrollPane_1.setViewportView(collection);
	
	btnBack = new JButton("Back");
	btnBack.setBounds(81, 271, 117, 29);
	add(btnBack);
	
	textField = new JTextField();
	textField.setBounds(110, 16, 180, 28);
	add(textField);
	textField.setColumns(10);
	
	btnSearch = new JButton("Search");
	btnSearch.setBounds(290, 17, 117, 29);
	add(btnSearch);

}
 
开发者ID:ikhaliq15,项目名称:JHearthstone,代码行数:57,代码来源:MakeDeckPanel.java

示例10: LoginPanel

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the panel.
 */
public LoginPanel() {
	setLayout(null);
	
	jpf_Password = new JPasswordField();
	jpf_Password.setBounds(123, 188, 254, 28);
	jpf_Password.setColumns(20);
	add(jpf_Password);
	
	btn_Submit = new JButton("Login");
	btn_Submit.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		}
	});
	btn_Submit.setBounds(123, 228, 117, 29);
	add(btn_Submit);
	
	JLabel lblPassword = new JLabel("Password:");
	lblPassword.setBounds(54, 194, 63, 16);
	add(lblPassword);
	
	JLabel lblUsername = new JLabel("Username:");
	lblUsername.setBounds(47, 127, 70, 16);
	add(lblUsername);
	
	jtf_Username = new JTextField();
	jtf_Username.setBounds(123, 121, 254, 28);
	add(jtf_Username);
	jtf_Username.setColumns(20);
	
	JPanel panel = new JPanel();
	panel.setBorder(new LineBorder(new Color(0, 0, 0)));
	panel.setBounds(434, 20, 245, 260);
	add(panel);
	panel.setLayout(null);
	
	JLabel lblUpdateNotes = new JLabel("Update Notes:");
	lblUpdateNotes.setBounds(6, 6, 89, 16);
	panel.add(lblUpdateNotes);
	
	JTextPane txtpn_UpdateNotes = new JTextPane();
	txtpn_UpdateNotes.setEditable(false);
	txtpn_UpdateNotes.setBackground(this.getBackground());
	txtpn_UpdateNotes.setText("* Added Support for Multiplayer\n\n\n* Support for login\n\n\n* Server can hold multiple games at once");
	txtpn_UpdateNotes.setBounds(16, 34, 211, 207);
	panel.add(txtpn_UpdateNotes);
	
	JLabel lblNewLabel = new JLabel("Hearthstone");
	lblNewLabel.setFont(new Font("Lucida Grande", Font.PLAIN, 35));
	lblNewLabel.setBounds(150, 35, 211, 61);
	add(lblNewLabel);
			
	btn_SignUp = new JButton("Sign Up");
	btn_SignUp.setBounds(260, 228, 117, 29);
	add(btn_SignUp);

}
 
开发者ID:ikhaliq15,项目名称:JHearthstone,代码行数:60,代码来源:LoginPanel.java

示例11: Gestiones

import javax.swing.JTextField; //导入方法依赖的package包/类
/**
 * Create the frame.
 **/
public Gestiones() {
	setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
	setBounds(100, 100, 403, 359);
	setLocationRelativeTo(null);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);
	
	btnPrimero = new JButton("<<");
	btnPrimero.setBounds(14, 215, 54, 23);
	contentPane.add(btnPrimero);
	btnPrimero.addActionListener(this);
	
	btnAnterior = new JButton("<");
	btnAnterior.setBounds(82, 215, 54, 23);
	contentPane.add(btnAnterior);
	btnAnterior.addActionListener(this);
	
	btnSiguiente = new JButton(">");
	btnSiguiente.setBounds(250, 215, 54, 23);
	contentPane.add(btnSiguiente);
	btnSiguiente.addActionListener(this);
	
	btnUltimo = new JButton(">>");
	btnUltimo.setBounds(318, 215, 54, 23);
	contentPane.add(btnUltimo);
	btnUltimo.addActionListener(this);
	
	txtEstado = new JTextField();
	txtEstado.setHorizontalAlignment(SwingConstants.CENTER);
	txtEstado.setEditable(false);
	txtEstado.setBounds(150, 216, 86, 20);
	contentPane.add(txtEstado);
	txtEstado.setColumns(10);
	
	btnModificar = new JButton("Modificar");
	btnModificar.setBounds(30, 273, 89, 23);
	contentPane.add(btnModificar);
	btnModificar.addActionListener(this);
	
	btnNuevo = new JButton("Nuevo");
	btnNuevo.setBounds(149, 273, 89, 23);
	contentPane.add(btnNuevo);
	btnNuevo.addActionListener(this);
	
	btnEliminar = new JButton("Eliminar");
	btnEliminar.setBounds(268, 273, 89, 23);
	contentPane.add(btnEliminar);
	btnEliminar.addActionListener(this);
	
	setVisible(true);
	addWindowListener(this);
}
 
开发者ID:JuandeLS3,项目名称:Library-app,代码行数:58,代码来源:Gestiones.java

示例12: GestionRevistas

import javax.swing.JTextField; //导入方法依赖的package包/类
public GestionRevistas(Connection conn,JFrame principal) {
	super();
	this.conn=conn;		// Recibimos la conexi�n de Biblioteca
	this.principal=principal;
	this.principal.setEnabled(false);
	this.principal.setVisible(false);
	setTitle("Gesti�n de revistas");
	
	txtCodigo = new JTextField();
	txtCodigo.setEditable(false);
	txtCodigo.setHorizontalAlignment(SwingConstants.CENTER);
	txtCodigo.setBounds(58, 67, 106, 20);
	getContentPane().add(txtCodigo);
	txtCodigo.setColumns(10);
	
	txtSignatura = new JTextField();
	txtSignatura.setEditable(false);
	txtSignatura.setHorizontalAlignment(SwingConstants.CENTER);
	txtSignatura.setBounds(222, 67, 106, 20);
	getContentPane().add(txtSignatura);
	txtSignatura.setColumns(10);
	
	txtNombre = new JTextField();
	txtNombre.setEditable(false);
	txtNombre.setHorizontalAlignment(SwingConstants.CENTER);
	txtNombre.setBounds(58, 136, 106, 20);
	getContentPane().add(txtNombre);
	txtNombre.setColumns(10);
	
	txtMateria = new JTextField();
	txtMateria.setEditable(false);
	txtMateria.setHorizontalAlignment(SwingConstants.CENTER);
	txtMateria.setBounds(222, 136, 106, 20);
	getContentPane().add(txtMateria);
	txtMateria.setColumns(10);
	
	lblCodigo = new JLabel("Codigo");
	lblCodigo.setHorizontalAlignment(SwingConstants.CENTER);
	lblCodigo.setBounds(81, 42, 60, 14);
	getContentPane().add(lblCodigo);
	
	lblNombre = new JLabel("Nombre");
	lblNombre.setHorizontalAlignment(SwingConstants.CENTER);
	lblNombre.setBounds(245, 42, 60, 14);
	getContentPane().add(lblNombre);
	
	lblSignatura = new JLabel("Signatura");
	lblSignatura.setHorizontalAlignment(SwingConstants.CENTER);
	lblSignatura.setBounds(81, 111, 60, 14);
	getContentPane().add(lblSignatura);
	
	lblMateria = new JLabel("Materia");
	lblMateria.setHorizontalAlignment(SwingConstants.CENTER);
	lblMateria.setBounds(245, 111, 60, 14);
	getContentPane().add(lblMateria);
	
	lblGestinDeRevistas = new JLabel("Gesti\u00F3n de revistas");
	lblGestinDeRevistas.setForeground(Color.BLUE);
	lblGestinDeRevistas.setHorizontalAlignment(SwingConstants.CENTER);
	lblGestinDeRevistas.setBounds(142, 11, 114, 14);
	getContentPane().add(lblGestinDeRevistas);
	

}
 
开发者ID:JuandeLS3,项目名称:Library-app,代码行数:65,代码来源:GestionRevistas.java

示例13: GestionUsuarios

import javax.swing.JTextField; //导入方法依赖的package包/类
public GestionUsuarios(Connection conn,JFrame principal) {
	super();
	this.conn=conn;		// Recibimos la conexi�n de Biblioteca
	this.principal=principal;
	this.principal.setEnabled(false);
	this.principal.setVisible(false);
	setTitle("Gesti�n de usuarios");
	
	txtApellido1 = new JTextField();
	txtApellido1.setEditable(false);
	txtApellido1.setHorizontalAlignment(SwingConstants.CENTER);
	txtApellido1.setBounds(14, 78, 110, 20);
	getContentPane().add(txtApellido1);
	txtApellido1.setColumns(10);
	
	txtApellido2 = new JTextField();
	txtApellido2.setEditable(false);
	txtApellido2.setHorizontalAlignment(SwingConstants.CENTER);
	txtApellido2.setBounds(138, 78, 110, 20);
	getContentPane().add(txtApellido2);
	txtApellido2.setColumns(10);
	
	txtNombre = new JTextField();
	txtNombre.setEditable(false);
	txtNombre.setHorizontalAlignment(SwingConstants.CENTER);
	txtNombre.setBounds(262, 78, 110, 20);
	getContentPane().add(txtNombre);
	txtNombre.setColumns(10);
	
	JLabel lblApellido = new JLabel("Apellido 1");
	lblApellido.setHorizontalAlignment(SwingConstants.CENTER);
	lblApellido.setBounds(41, 53, 56, 14);
	getContentPane().add(lblApellido);
	
	JLabel lblApellido_1 = new JLabel("Apellido 2");
	lblApellido_1.setHorizontalAlignment(SwingConstants.CENTER);
	lblApellido_1.setBounds(165, 53, 56, 14);
	getContentPane().add(lblApellido_1);
	
	JLabel lblNombre = new JLabel("Nombre");
	lblNombre.setHorizontalAlignment(SwingConstants.CENTER);
	lblNombre.setBounds(289, 53, 56, 14);
	getContentPane().add(lblNombre);
	
	txtCodigoUser = new JTextField();
	txtCodigoUser.setEditable(false);
	txtCodigoUser.setHorizontalAlignment(SwingConstants.CENTER);
	txtCodigoUser.setBounds(153, 136, 86, 20);
	getContentPane().add(txtCodigoUser);
	txtCodigoUser.setColumns(10);
	
	lblCodigo = new JLabel("Codigo");
	lblCodigo.setHorizontalAlignment(SwingConstants.CENTER);
	lblCodigo.setBounds(173, 111, 46, 14);
	getContentPane().add(lblCodigo);
	
	lblGestinDeUsuario = new JLabel("Gesti\u00F3n de usuario");
	lblGestinDeUsuario.setHorizontalAlignment(SwingConstants.CENTER);
	lblGestinDeUsuario.setForeground(Color.BLUE);
	lblGestinDeUsuario.setBounds(137, 11, 111, 14);
	getContentPane().add(lblGestinDeUsuario);
}
 
开发者ID:JuandeLS3,项目名称:Library-app,代码行数:63,代码来源:GestionUsuarios.java

示例14: GestionArticulos

import javax.swing.JTextField; //导入方法依赖的package包/类
public GestionArticulos(Connection conn,JFrame principal) {
	super();
	this.conn=conn;		// Recibimos la conexi�n de Biblioteca
	this.principal=principal;
	this.principal.setEnabled(false);
	this.principal.setVisible(false);
	setTitle("Gesti�n de art�culos");
	
	txtCodigo = new JTextField();
	txtCodigo.setHorizontalAlignment(SwingConstants.CENTER);
	txtCodigo.setEditable(false);
	txtCodigo.setBounds(59, 68, 105, 20);
	getContentPane().add(txtCodigo);
	txtCodigo.setColumns(10);
	
	txtTitulo = new JTextField();
	txtTitulo.setHorizontalAlignment(SwingConstants.CENTER);
	txtTitulo.setEditable(false);
	txtTitulo.setBounds(223, 68, 105, 20);
	getContentPane().add(txtTitulo);
	txtTitulo.setColumns(10);
	
	txtAutor = new JTextField();
	txtAutor.setHorizontalAlignment(SwingConstants.CENTER);
	txtAutor.setEditable(false);
	txtAutor.setBounds(59, 131, 105, 20);
	getContentPane().add(txtAutor);
	txtAutor.setColumns(10);
	
	txtNumpaginas = new JTextField();
	txtNumpaginas.setHorizontalAlignment(SwingConstants.CENTER);
	txtNumpaginas.setEditable(false);
	txtNumpaginas.setBounds(223, 131, 105, 20);
	getContentPane().add(txtNumpaginas);
	txtNumpaginas.setColumns(10);
	
	JLabel lblCdigo = new JLabel("C\u00F3digo");
	lblCdigo.setHorizontalAlignment(SwingConstants.CENTER);
	lblCdigo.setBounds(88, 43, 46, 14);
	getContentPane().add(lblCdigo);
	
	JLabel lblTitulo = new JLabel("Titulo");
	lblTitulo.setHorizontalAlignment(SwingConstants.CENTER);
	lblTitulo.setBounds(252, 43, 46, 14);
	getContentPane().add(lblTitulo);
	
	JLabel lblAutor = new JLabel("Autor");
	lblAutor.setHorizontalAlignment(SwingConstants.CENTER);
	lblAutor.setBounds(88, 106, 46, 14);
	getContentPane().add(lblAutor);
	
	JLabel lblNumPginas = new JLabel("Num. p\u00E1ginas");
	lblNumPginas.setHorizontalAlignment(SwingConstants.CENTER);
	lblNumPginas.setBounds(228, 106, 95, 14);
	getContentPane().add(lblNumPginas);
	
	JLabel lblGestinDeArtculos = new JLabel("Gesti\u00F3n de art\u00EDculos");
	lblGestinDeArtculos.setForeground(Color.BLUE);
	lblGestinDeArtculos.setHorizontalAlignment(SwingConstants.CENTER);
	lblGestinDeArtculos.setBounds(141, 11, 117, 14);
	getContentPane().add(lblGestinDeArtculos);
	

}
 
开发者ID:JuandeLS3,项目名称:Library-app,代码行数:65,代码来源:GestionArticulos.java

示例15: PasswordManagerRegistration

import javax.swing.JTextField; //导入方法依赖的package包/类
public PasswordManagerRegistration(PasswordManagerGUI gui) {
       this.gui = gui;
	regpanel = new JPanel();
	regpanel.setLayout(new BorderLayout(0, 0));
	JPanel panel_1 = new JPanel();
	regpanel.add(panel_1, BorderLayout.NORTH);

	JLabel lblRegistration = new JLabel(Labels.REG_REGISTRATION);
	lblRegistration.setFont(new Font("Tahoma", Font.PLAIN, 38));
	panel_1.add(lblRegistration);

	JPanel panel_2 = new JPanel();
	regpanel.add(panel_2, BorderLayout.CENTER);
	panel_2.setLayout(null);

	JLabel lblUsername = new JLabel(Labels.REG_USERNAME);
	lblUsername.setBounds(74, 92, 132, 16);
	panel_2.add(lblUsername);
	
	JLabel lblPassword = new JLabel(Labels.REG_PASSWORD);
	lblPassword.setBounds(74, 149, 173, 16);
	panel_2.add(lblPassword);
	
	JLabel lblPasswordAgain = new JLabel(Labels.REG_RE_PASSWORD);
	lblPasswordAgain.setBounds(74, 204, 173, 16);
	panel_2.add(lblPasswordAgain);
	
	txtUsername = new JTextField();
	txtUsername.setBounds(252, 89, 380, 22);
	panel_2.add(txtUsername);
	txtUsername.setColumns(10);
	
	txtPass1 = new JPasswordField();
	txtPass1.setBounds(252, 146, 380, 22);
	panel_2.add(txtPass1);
	
	txtPass2 = new JPasswordField();
	txtPass2.setBounds(252, 201, 380, 22);
	txtPass1.addActionListener(gui.getController());
	txtPass1.setActionCommand(Labels.REG_PASS1FIELD);
	txtPass2.addActionListener(gui.getController());
       txtPass2.setActionCommand(Labels.REG_PASS2FIELD);
	txtUsername.addActionListener(gui.getController());
       txtUsername.setActionCommand(Labels.REG_USERFIELD);
	panel_2.add(txtPass2);
	
	JButton btnRegistration = new JButton(Labels.REG_REGBUTTON);
	btnRegistration.addActionListener(gui.getController());

	btnRegistration.setBounds(278, 288, 151, 25);
	panel_2.add(btnRegistration);

}
 
开发者ID:zoltanvi,项目名称:password-manager,代码行数:54,代码来源:PasswordManagerRegistration.java


注:本文中的javax.swing.JTextField.setBounds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。