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


Java JPasswordField.setBounds方法代码示例

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


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

示例1: UserCredentialsPanel

import javax.swing.JPasswordField; //导入方法依赖的package包/类
public UserCredentialsPanel(){
	setSize(new Dimension(900, 300));
	setPreferredSize(new Dimension(900, 300));
	setMinimumSize(new Dimension(450, 300));
	setLayout(null);
	
	JLabel lblUsername = new JLabel("Username");
	lblUsername.setBounds(12, 12, 86, 15);
	add(lblUsername);
	
	JLabel lblPassword = new JLabel("Password");
	lblPassword.setBounds(12, 49, 70, 15);
	add(lblPassword);
	
	usernameField = new JTextField();
	usernameField.setBounds(116, 10, 114, 19);
	add(usernameField);
	usernameField.setColumns(10);
	
	passwordField = new JPasswordField();
	passwordField.setBounds(116, 47, 114, 19);
	add(passwordField);
}
 
开发者ID:roscisz,项目名称:KernelHive,代码行数:24,代码来源:UserCredentialsPanel.java

示例2: createProxyPanel

import javax.swing.JPasswordField; //导入方法依赖的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

示例3: Main

import javax.swing.JPasswordField; //导入方法依赖的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

示例4: SignUpPanel

import javax.swing.JPasswordField; //导入方法依赖的package包/类
/**
 * Create the panel.
 */
public SignUpPanel() {
	setLayout(null);
	
	JLabel lblNewLabel = new JLabel("Hearthstone");
	lblNewLabel.setFont(new Font("Lucida Grande", Font.PLAIN, 35));
	lblNewLabel.setBounds(150, 35, 211, 61);
	add(lblNewLabel);
	
	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 label = new JLabel("Username:");
	label.setBounds(58, 103, 70, 16);
	add(label);
	
	txt_Username = new JTextField();
	txt_Username.setColumns(20);
	txt_Username.setBounds(134, 97, 254, 28);
	add(txt_Username);
	
	JLabel label_1 = new JLabel("Password:");
	label_1.setBounds(65, 151, 63, 16);
	add(label_1);
	
	psf_Password = new JPasswordField();
	psf_Password.setColumns(20);
	psf_Password.setBounds(134, 145, 254, 28);
	add(psf_Password);
	
	pwf_Retype = new JPasswordField();
	pwf_Retype.setColumns(20);
	pwf_Retype.setBounds(134, 191, 254, 28);
	add(pwf_Retype);
	
	JLabel lblRetypePassword = new JLabel("Retype Password:");
	lblRetypePassword.setBounds(19, 197, 109, 16);
	add(lblRetypePassword);
	
	btn_Login = new JButton("Login");
	btn_Login.setBounds(134, 240, 117, 29);
	add(btn_Login);
	
	btn_SignUp = new JButton("Sign Up");
	btn_SignUp.setBounds(271, 240, 117, 29);
	add(btn_SignUp);

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

示例5: LoginPanel

import javax.swing.JPasswordField; //导入方法依赖的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

示例6: LoginDialog

import javax.swing.JPasswordField; //导入方法依赖的package包/类
public LoginDialog() {
	getContentPane().setLayout(null);

	final JLabel lblUsername = new JLabel("Username");
	lblUsername.setBounds(12, 12, 86, 15);
	getContentPane().add(lblUsername);

	final JLabel lblPassword = new JLabel("Password");
	lblPassword.setBounds(12, 39, 86, 15);
	getContentPane().add(lblPassword);

	textField = new JTextField();
	textField.setBounds(116, 10, 114, 19);
	getContentPane().add(textField);
	textField.setColumns(10);

	passwordField = new JPasswordField();
	passwordField.setBounds(116, 37, 114, 19);
	getContentPane().add(passwordField);

	lblValidationError = new JLabel("Invalid username or password!");
	lblValidationError
			.setIcon(new ImageIcon(
					NewProjectDialog.class
							.getResource("/com/sun/java/swing/plaf/windows/icons/Error.gif")));
	lblValidationError.setBounds(12, 66, 424, 32);
	getContentPane().add(lblValidationError);

	btnLogin = new JButton("Login");
	btnLogin.setBounds(319, 230, 117, 25);
	btnLogin.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed(final ActionEvent e) {
			// TODO

		}
	});
	getContentPane().add(btnLogin);

	progressBar = new JProgressBar();
	progressBar.setBounds(12, 110, 424, 14);
	getContentPane().add(progressBar);
}
 
开发者ID:roscisz,项目名称:KernelHive,代码行数:45,代码来源:LoginDialog.java

示例7: PasswordManagerRegistration

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