⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 portrait.java

📁 这个QQ通信系统项目是我之前发过类似的一个大的整合
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
					"/picture/110.gif")));
			jLabel264.addMouseListener(this);
			jLabel263 = new JLabel();
			jLabel263.setBounds(new Rectangle(214, 96, 40, 40));
			jLabel263.setText("11.gif");
			jLabel263.setIcon(new ImageIcon(getClass().getResource(
					"/picture/11.gif")));
			jLabel263.addMouseListener(this);
			jLabel262 = new JLabel();
			jLabel262.setBounds(new Rectangle(108, 96, 40, 40));
			jLabel262.setText("107.gif");
			jLabel262.setIcon(new ImageIcon(getClass().getResource(
					"/picture/107.gif")));
			jLabel262.addMouseListener(this);
			jLabel261 = new JLabel();
			jLabel261.setBounds(new Rectangle(14, 96, 40, 40));
			jLabel261.setText("105.gif");
			jLabel261.setIcon(new ImageIcon(getClass().getResource(
					"/picture/105.gif")));
			jLabel261.addMouseListener(this);
			jLabel26 = new JLabel();
			jLabel26.setBounds(new Rectangle(264, 42, 40, 40));
			jLabel26.setText("103.gif");
			jLabel26.setIcon(new ImageIcon(getClass().getResource(
					"/picture/103.gif")));
			jLabel26.addMouseListener(this);
			jLabel25 = new JLabel();
			jLabel25.setBounds(new Rectangle(214, 42, 40, 40));
			jLabel25.setText("104.gif");
			jLabel25.setIcon(new ImageIcon(getClass().getResource(
					"/picture/104.gif")));
			jLabel25.addMouseListener(this);
			jLabel24 = new JLabel();
			jLabel24.setBounds(new Rectangle(164, 42, 40, 40));
			jLabel24.setText("102.gif");
			jLabel24.setIcon(new ImageIcon(getClass().getResource(
					"/picture/102.gif")));
			jLabel24.addMouseListener(this);
			jLabel23 = new JLabel();
			jLabel23.setBounds(new Rectangle(114, 42, 40, 40));
			jLabel23.setText("101.gif");
			jLabel23.setIcon(new ImageIcon(getClass().getResource(
					"/picture/101.gif")));
			jLabel23.addMouseListener(this);
			jLabel22 = new JLabel();
			jLabel22.setText("10.gif");
			jLabel22.setBounds(new Rectangle(2, 2, 40, 40));
			jLabel22.setIcon(new ImageIcon(getClass().getResource(
					"/picture/10.gif")));
			jLabel22.addMouseListener(this);
			jPanel1 = new JPanel();
			jPanel1.setLayout(null);
			jPanel1.setBounds(new Rectangle(12, 5, 343, 273));
			jPanel1.setBackground(Color.white);
			jPanel1.setBorder(BorderFactory.createLineBorder(Color.black, 1));
			jPanel1.add(getJScrollBar(), null);
			jPanel1.add(getJPanel2(), null);
			jPanel1.add(jLabel23, null);
			jPanel1.add(jLabel24, null);
			jPanel1.add(jLabel25, null);
			jPanel1.add(jLabel26, null);
			jPanel1.add(jLabel261, null);
			jPanel1.add(jLabel262, null);
			jPanel1.add(jLabel263, null);
			jPanel1.add(jLabel264, null);
			jPanel1.add(jLabel265, null);
			jPanel1.add(jLabel266, null);
			jPanel1.add(jLabel2611, null);
			jPanel1.add(jLabel2612, null);
			jPanel1.add(jLabel2613, null);
			jPanel1.add(jLabel2614, null);
			jPanel1.add(jLabel2615, null);
			jPanel1.add(jLabel2616, null);
			jPanel1.add(jLabel26111, null);
			jPanel1.add(jLabel26112, null);
			jPanel1.add(jLabel26113, null);
			jPanel1.add(jLabel26114, null);
			jPanel1.add(jLabel26115, null);
			jPanel1.add(jLabel26116, null);
			jPanel1.add(getJPanel3(), null);
			jPanel1.add(getJPanel4(), null);
		}
		return jPanel1;
	}

	/**
	 * This method initializes jScrollBar
	 * 
	 * @return javax.swing.JScrollBar
	 */
	private JScrollBar getJScrollBar() {
		if (jScrollBar == null) {
			jScrollBar = new JScrollBar();
			jScrollBar.setBounds(new Rectangle(327, 1, 15, 272));
		}
		return jScrollBar;
	}

	/**
	 * This method initializes jPanel2
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(7, 6, 125, 21));
			jLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
			jLabel.setForeground(new Color(51, 51, 255));
			jLabel.setText("头像共有(24)个");
			jPanel2 = new JPanel();
			jPanel2.setLayout(null);
			jPanel2.setBounds(new Rectangle(1, 1, 327, 32));
			jPanel2.setBorder(BorderFactory.createLineBorder(Color.black, 1));
			jPanel2.setBackground(new Color(226, 247, 254));
			jPanel2.add(jLabel, null);
		}
		return jPanel2;
	}

	/**
	 * This method initializes jButton
	 * 
	 * @return javax.swing.JButton
	 */
	private JButton getJButton() {
		if (jButton == null) {
			jButton = new JButton();
			jButton.setBounds(new Rectangle(375, 110, 87, 18));
			jButton.setText("本地上传");
			jButton.setHorizontalAlignment(SwingConstants.LEFT);
			jButton.setVerticalAlignment(SwingConstants.CENTER);
			jButton.setVerticalTextPosition(SwingConstants.CENTER);
			jButton.setHorizontalTextPosition(SwingConstants.LEFT);
			jButton.setBackground(new Color(136, 193, 243));
		}
		return jButton;
	}

	/**
	 * This method initializes jButton1
	 * 
	 * @return javax.swing.JButton
	 */
	private JButton getJButton1() {
		if (jButton1 == null) {
			jButton1 = new JButton();
			jButton1.setBounds(new Rectangle(299, 300, 71, 23));
			jButton1.setBackground(new Color(124, 192, 243));
			jButton1.setText("确定");
			jButton1.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {

					if (obj instanceof Register) {
						Register register = (Register) obj;
						register.getJLabel16().setText(portraitName);
						register.getJLabel16().setIcon(
								new ImageIcon(getClass().getResource(
										"/picture/").getPath()
										+ portraitName));
						register.setEnabled(true);
					}
					if (obj instanceof ChangeInfo) {
						ChangeInfo changeInfo = (ChangeInfo) obj;
						changeInfo.getJLabel16().setText(portraitName);
						changeInfo.getJLabel16().setIcon(
								new ImageIcon(getClass().getResource(
										"/picture/").getPath()
										+ portraitName));
						changeInfo.setEnabled(true);
					}
					Portrait.this.dispose();

				}
			});
		}
		return jButton1;
	}

	/**
	 * This method initializes jButton2
	 * 
	 * @return javax.swing.JButton
	 */
	private JButton getJButton2() {
		if (jButton2 == null) {
			jButton2 = new JButton();
			jButton2.setBounds(new Rectangle(387, 300, 71, 23));
			jButton2.setBackground(new Color(124, 192, 243));
			jButton2.setText("取消");
			jButton2.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					if (obj instanceof Register) {
						Register register = (Register) obj;
						register.setEnabled(true);
					}

					if (obj instanceof ChangeInfo) {
						ChangeInfo changeInfo = (ChangeInfo) obj;
						changeInfo.setEnabled(true);
					}
					Portrait.this.dispose();
				}
			});
		}
		return jButton2;
	}

	/**
	 * This method initializes jPanel3
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanel3() {
		if (jPanel3 == null) {
			jLabel21 = new JLabel();
			jLabel21.setBounds(new Rectangle(1, 1, 40, 40));
			jLabel21.setText("100.gif");
			jLabel21.setIcon(new ImageIcon(getClass().getResource(
					"/picture/100.gif")));
			jLabel21.addMouseListener(this);
			jPanel3 = new JPanel();
			jPanel3.setLayout(null);
			jPanel3.setBounds(new Rectangle(14, 42, 44, 44));
			jPanel3.add(jLabel21, null);
		}
		return jPanel3;
	}

	/**
	 * This method initializes jPanel4
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanel4() {
		if (jPanel4 == null) {
			jPanel4 = new JPanel();
			jPanel4.setLayout(null);
			jPanel4.setBounds(new Rectangle(65, 42, 44, 44));
			jPanel4.add(jLabel22, null);
		}
		return jPanel4;
	}

	public void mouseClicked(MouseEvent e) {
		jLabel = (JLabel) e.getSource();
		portraitName = jLabel.getText();
		jLabel2.setIcon(new ImageIcon(getClass().getResource("/picture/")
				.getPath()
				+ portraitName));
	}

	public void mouseEntered(MouseEvent e) {

	}

	public void mouseExited(MouseEvent e) {

	}

	public void mousePressed(MouseEvent e) {

	}

	public void mouseReleased(MouseEvent e) {

	}

} // @jve:decl-index=0:visual-constraint="10,11"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -