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


Java JProgressBar.setBounds方法代码示例

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


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

示例1: SendFileFrame

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
 * Create the frame.
 */
public SendFileFrame()
{
	//this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setBounds(100, 100, 510, 196);
	contentPane = new JPanel();
	contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
	setContentPane(contentPane);
	contentPane.setLayout(null);

	lbl = new JLabel("进度条");
	lbl.setBounds(42, 35, 74, 33);
	contentPane.add(lbl);

	progressBar = new JProgressBar();
	progressBar.setForeground(Color.BLUE);
	progressBar.setBounds(96, 35, 332, 33);
	contentPane.add(progressBar);

	lblProgress = new JLabel("");
	lblProgress.setBounds(64, 82, 386, 58);
	contentPane.add(lblProgress);
}
 
开发者ID:sxei,项目名称:myqq,代码行数:26,代码来源:SendFileFrame.java

示例2: init

import javax.swing.JProgressBar; //导入方法依赖的package包/类
private void init() {
	lblInfo = new JLabel("Extracting...");
	lblInfo.setBounds(5, 5, 100, 15);
	frame.getContentPane().add(lblInfo);
	
	bar = new JProgressBar();
	bar.setIndeterminate(true);
	bar.setBounds(5, 20, 280, 30);
	frame.getContentPane().add(bar);
	
	frame.setVisible(true);
	new Thread(new Runnable() {
		public void run() {
			extract();
		}
	}).start();
	
}
 
开发者ID:JudgeGlass,项目名称:Install_Builder_Universal,代码行数:19,代码来源:ExtractWindow.java

示例3: LoginDialog

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

示例4: initComponents

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
 * Inicia los componentes del panel del Score
 */
public void initComponents(){
    int extra = 30;
    //FUENTE
    StarJedi = this.cargarFuente("../Starjedi.ttf");
    
    /**
     * TODO TIEMPO
     */
    iconTiempo = new JLabel("tiempo");               
    iconTiempo.setBounds(40, 10+extra, 200, 50);
    iconTiempo.setForeground(Color.yellow);
    iconTiempo.setFont(StarJedi);
    
    intTiempo = 0;
    tiempo = new JLabel(String.valueOf(intTiempo));
    tiempo.setBounds(82, 80+extra, 100, 30);
    tiempo.setForeground(Color.yellow);
    tiempo.setFont(StarJedi.deriveFont(1, 22f));
    
    /**
     * TODO SCORE
     */
    iconScore = new JLabel("score");               
    iconScore.setBounds(45, 130+extra, 200, 50);
    iconScore.setForeground(Color.yellow);
    iconScore.setFont(StarJedi);
    
    intScore = 0;
    score = new JLabel(String.valueOf(intScore));
    score.setForeground(Color.yellow);
    score.setFont(StarJedi.deriveFont(1, 22f));
    score.setBounds(90, 200+extra, 100, 30);
    
    /**
     * TODO COMBUSTIBLE
     */
    iconFuel = new JLabel();               
    iconFuel.setBounds(10, 250+extra, 200, 50);
    iconFuel.setForeground(Color.yellow);
    iconFuel.setFont(StarJedi.deriveFont(1, 22f));
    iconFuel.setText("Combustible");
    
    fuel = new JProgressBar(0);
    fuel.setBounds(25, 325+extra, 150, 30);  
    fuel.setValue(100);
    fuel.setBackground(Color.BLACK);
    
    /**
     * TODO VIDAS
     */
    iconLives = new JLabel();               
    iconLives.setBounds(43, 380+extra, 200, 50);
    iconLives.setForeground(Color.yellow);
    iconLives.setFont(StarJedi);
    iconLives.setText("vidas");
    
    intLives = 3;
    lives = new JLabel(String.valueOf(intLives));
    lives.setForeground(Color.yellow);
    lives.setFont(StarJedi.deriveFont(1, 22f));
    lives.setBounds(90, 450+extra, 100, 30);
    
    super.add(iconTiempo, 0);
    super.add(tiempo, 0);
    super.add(iconScore, 0);
    super.add(score, 0);
    super.add(iconFuel, 0);
    super.add(fuel, 0);
    super.add(iconLives, 0);
    super.add(lives, 0);
}
 
开发者ID:Uminks,项目名称:Star-Ride--RiverRaid,代码行数:75,代码来源:PanelScore.java


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