![]() |
TQC+ JAVA6 物件導向視窗及資料庫程式設計 - 第一類:視窗程式設計 |
April 06, 2015 01:43AM 發表文章數: 90 |
(1) Creating and Setting Up a Frame | |
JFrame()
JFrame(String) |
Constructor
String: Title |
void setDefaultCloseOperation(int)
int getDefaultCloseOperation() |
Possible Argument for the int:
WindowConstants.DO_NOTHING_ON_CLOSE WindowConstants.HIDE_ON_CLOSE WindowConstants.DIPOSE_ON_CLOSE JFrame.EXIT_ON_CLOSE |
void setTitle(String)
String getTitle() ( in Frame) |
|
void setIconImage(Image)
Image getIconImage() ( in Frame) |
|
void setUndecorated(boolean)
boolean isUndecorated() ( in Frame) |
|
static void setDefaultLookAndFeelDecorated(boolean)
static boolean isDefaultLookAndFeelDecorated() ( in Frame) |
|
(2)Setting the Window Size and Loation
|
|
void pack()
in Window |
|
void setSize(int, int)
void setSize(Dimension) Dimension getSize() (in Component) |
|