2个回答
展开全部
//运行下吧~
import javax.swing.JButton;
import javax.swing.JFrame;
public class TipTest extends JFrame {
private static final long serialVersionUID = 5638996572665148343L;
JButton b = new JButton("移动鼠标到我");
public void init(){
this.setLayout(null);
b.setBounds(50, 50, 150, 25);
b.setToolTipText("我知道了");//here
this.add(b);
this.setBounds(200, 200, 400, 300);
this.setResizable(false);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
}
public static void main(String[] args) {
new TipTest().init();
}
}
import javax.swing.JButton;
import javax.swing.JFrame;
public class TipTest extends JFrame {
private static final long serialVersionUID = 5638996572665148343L;
JButton b = new JButton("移动鼠标到我");
public void init(){
this.setLayout(null);
b.setBounds(50, 50, 150, 25);
b.setToolTipText("我知道了");//here
this.add(b);
this.setBounds(200, 200, 400, 300);
this.setResizable(false);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
}
public static void main(String[] args) {
new TipTest().init();
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询