爱玺玺

爱玺玺的生活日记本。wx:lb87626

java 父窗口如果new 了一个窗口,在关闭窗口时不能关闭调用者窗口,那么被调用的窗口就不要写关闭退出

ava 父窗口如果new 了一个窗口,在关闭窗口时不能关闭调用者窗口,那么被调用的窗口就不要写关闭退出

public void mouseClicked(MouseEvent e) {

if(e.getClickCount()==2){

String num=((JLabel)e.getSource

java 简单发送消息的聊天界面

this.add(jsp,"Center"); 这里必须设置成Center;不能用North,否则South不会显示

java swing简单好友列表界面

package com.qq.view;


import java.awt.BorderLayout;

import java.awt.CardLayout;

import java.awt.Container;

import java.awt.GridLayout;

import java.awt.Toolkit;

import java.awt.event.ActionEvent;

java创建对象数组

JLabel[] jlhead=new JLabel[50];

java 对象流发送对象

重点:

1,发送者发送的对象和接收者接收的对象是完全相同的类

2,传递的对象的类必须序列话 ,比如:class User  implements Serializable

3,发送后关闭套接字防止Connection Reset错误,s.close()


import java.io.ObjectInputStream;

import java.net.ServerSocket;

imp

invalidClassException 类似无效的

invalidClassException 类似无效的,比如强制转换时转错误或转换成不存在的类

java图片背景Jpanel

g.drawImage(imgbg,0,0, this.getWidth(), this.getHeight(), this);

java判断鼠标移到按钮上

@Override

public void mouseEntered(MouseEvent e) {

java鼠标移上去变成手

Cursor mycursor=new Cursor(Cursor.HAND_CURSOR);

jlm1.setCursor(mycursor);

sqlserver登录验证注意nchar有空字符,应用trim去除一下

String check=lm.loginCheck(jtf1.getText().trim(), new String(jpf1.getPassword())).trim();

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5