Win.toFront();//这样弹出窗口不会在最前吗?
Win.show();
这两条应该交换下位置:
Win.show();
Win.toFront();
就可以实现在最前,toFront() 的前提是 the Window is visible
Win.show();
这两条应该交换下位置:
Win.show();
Win.toFront();
就可以实现在最前,toFront() 的前提是 the Window is visible
JButton button =new JButton("hello"){
public Dimension getPreferredSize(){
return new Dimension(300,100);//随便你设置
}
};