这个你要调用
void setRolloverEnabled(boolean b)
Sets the rolloverEnabled property, which must be true for rollover effects to occur. javax.swing.AbstractButton类的方法
void setRolloverEnabled(boolean b)
Sets the rolloverEnabled property, which must be true for rollover effects to occur. javax.swing.AbstractButton类的方法
解决方案 »
- 为什么子类无法访问非本包的父类protected方法
- swt为什么不能打成jar包
- 怎样能解压带密码的Zip文件?
- 大家帮忙啊,我有一个JAR文件,里面有ANT的build.xml文件,我怎么样操作啊,在ECLIPSE中,感谢
- Exception in thread "main" java.lang.NoClassDefFoundError: app 这个错误是什么意思?????
- 制作EXE的工具,JSmooth 很好用的。
- JAVA题:如何实现给当前时间的分钟加15呢?
- 求助 莫名奇妙的错误
- 如何在服务器端判断J2EE容器的A目录有B文件?
- 难道就没有人知道吗?
- Jbuilder为什么总出现"unknown license file format."
- .jar文件是怎么回事,如何制作.jar文件?
import java.awt.event.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import com.borland.dx.sql.dataset.*;
import com.borland.dbswing.*;public class Frame1 extends JFrame {
JPanel contentPane;
XYLayout xYLayout1 = new XYLayout();
JTextField jTextField1 = new JTextField();
JButton jButton1 = new JButton(); //Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
//Component initialization
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
jTextField1.setText("jTextField1");
contentPane.setLayout(xYLayout1);
this.setSize(new Dimension(278, 157));
this.setTitle("Frame Title");
jButton1.setText("jButton1");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(MouseEvent e) {
jButton1_mouseEntered(e);
}
public void mouseExited(MouseEvent e) {
jButton1_mouseExited(e);
}
});
contentPane.add(jTextField1, new XYConstraints(37, 20, 139, 36));
contentPane.add(jButton1, new XYConstraints(133, 68, -1, -1));
}
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
} void jButton1_mouseEntered(MouseEvent e) {
this.jTextField1.setText("hello,you are come in");
} void jButton1_mouseExited(MouseEvent e) {
this.jTextField1.setText("hello,you are outing");
}
}