QQ登陆界面上的问题,快来回答啊 怎样实现鼠标点击在"申请帐号"和"忘了密码"上使字的颜色改变和鼠标变为手型了 "申请帐号"是用什么组件做的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对按钮使用事件,mouseEnter事件,当鼠标进入按钮后,对字体和鼠标形状进行设置 /* * Created on Oct 16,2008 * * Copyright by 布谷鸟 */package gui;import org.eclipse.swt.SWT;import org.eclipse.swt.events.MouseEvent;import org.eclipse.swt.events.MouseTrackAdapter;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.Label;import org.eclipse.swt.widgets.Shell;/** * * @Author cuckoo * @MSN [email protected] * @Time 16:30 * @Description * reset cursor and font style */public class QQLogin { public static void main(String args[]){ new QQLogin().init(); } private void init(){ _shell = new Shell( _display ); _shell.setSize(400, 300); _shell.setText(" QQ Login "); _applicationLabel = new Label( _shell,SWT.NONE); _applicationLabel.setText("申请帐户"); _applicationLabel.setBounds(10, 10, 100, 20); _applicationLabel.addMouseTrackListener(new MouseTrackAdapter(){ public void mouseEnter(MouseEvent e) { // TODO Auto-generated method stub _applicationLabel.setForeground( _display.getSystemColor(SWT.COLOR_RED)); _applicationLabel.setCursor( _display.getSystemCursor(SWT.CURSOR_HAND)); } public void mouseExit(MouseEvent e) { // TODO Auto-generated method stub _applicationLabel.setForeground( _display.getSystemColor(SWT.COLOR_BLACK)); _applicationLabel.setCursor( _display.getSystemCursor(SWT.CURSOR_NO)); } }); _shell.open(); while( !_shell.isDisposed()){ if( !_display.readAndDispatch()){ _display.sleep(); } } _display.dispose(); } private Display _display = Display.getDefault(); private Shell _shell = null ; private Label _applicationLabel = null ;}-----------------------------------------------Quietly through ... 喜欢QQ,模仿lumaqq,提升自已技术!! java中的DeskTop类很好的解决了这个问题。而且做出来的效果和你要的效果一模一样 关于金额乘以百分号的问题 流的关闭问题。 请教一个环境配置问题 关于String的创建 每个初学者都应该搞懂的问题(2) 高分求助!!!!!高分求助!!!!!高分求助!!!!!高分求助!!!!! 怎么调用自己定义的class ,小菜 100分----->如何用JBuilder的[Wizards\Native Executable Builder]功能将这样的工程制作成exe文件? 有个问题请指教! 有人听说过kawa么?我听人说很好用的。但我不知道怎么安装使用。谁会? main函数中获得JFrame窗体输入的值 怎样在界面上显示自己重新封装的java控件?
/*
* Created on Oct 16,2008
*
* Copyright by 布谷鸟
*/
package gui;import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;/**
*
* @Author cuckoo
* @MSN [email protected]
* @Time 16:30
* @Description
* reset cursor and font style
*/
public class QQLogin {
public static void main(String args[]){
new QQLogin().init();
}
private void init(){
_shell = new Shell( _display );
_shell.setSize(400, 300);
_shell.setText(" QQ Login ");
_applicationLabel = new Label( _shell,SWT.NONE);
_applicationLabel.setText("申请帐户");
_applicationLabel.setBounds(10, 10, 100, 20);
_applicationLabel.addMouseTrackListener(new MouseTrackAdapter(){
public void mouseEnter(MouseEvent e) {
// TODO Auto-generated method stub
_applicationLabel.setForeground( _display.getSystemColor(SWT.COLOR_RED));
_applicationLabel.setCursor( _display.getSystemCursor(SWT.CURSOR_HAND));
}
public void mouseExit(MouseEvent e) {
// TODO Auto-generated method stub
_applicationLabel.setForeground( _display.getSystemColor(SWT.COLOR_BLACK));
_applicationLabel.setCursor( _display.getSystemCursor(SWT.CURSOR_NO));
}
});
_shell.open();
while( !_shell.isDisposed()){
if( !_display.readAndDispatch()){
_display.sleep();
}
}
_display.dispose();
}
private Display _display = Display.getDefault();
private Shell _shell = null ;
private Label _applicationLabel = null ;
}
-----------------------------------------------
Quietly through ...