JFrame and JWindow
從 import 來看, 都是 javax.swing 內了類別.
import javax.swing.JFrame;
import javax.swing.JWindow;
public class JWindow_test_001{
public static void main(String args[]){
JFrame f = new JFrame("JFrame");
f.setSize(300,300);
f.setLocation(100,100); //設定顯示位置
JWindow w = new JWindow();
w.setSize(300,300);
w.setLocation(500,100);
f.setVisible(true); //顯示視窗
w.setVisible(true);
}
}
-----------------------
JFrame
-----------------------
-----------------------
JWindow
-----------------------
差別在於有無邊框 .
http://www.java2s.com/Tutorials/Java/Java_Swing/1360__Java_Swing_JWindow.htm
沒有留言:
張貼留言