Quantcast
Channel: MEPO Forum - 程式設計
Viewing all articles
Browse latest Browse all 99

TQC+ JAVA6 物件導向視窗及資料庫程式設計 - 第一類:視窗程式設計 (no replies)

$
0
0
目錄
101. 視窗個數控制
102. 說定視窗標題
103. 變便視窗大小/a>
104.檔案選取
105. 調色盤
106. 元件相對位置
107. 2D雪人繪圖
108. 繪製圖形
109. 畫筆功能
110.問卷調查


101. 視窗個數控制

原始檔:



結果檔:




執行結果:


































(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)





回到目錄


102. 說定視窗標題

原始檔:



結果檔:




執行結果:
一開始:

按一前關閉鈕:



回到目錄


103. 變便視窗大小

103. 變便視窗大小
原始檔:


結果檔:




執行結果:
剛開始

按其中一個鈕後




回到目錄




104.檔案選取


原始檔:


結果檔:




執行結果:
一開始

沒選任何檔案




回到目錄


105. 調色盤


原始檔:



結果檔:




執行結果:
一開始

選擇某一顏色

確定該顏色




回到目錄


106. 元件相對位置


原始檔:



結果檔:



執行結果:
一開始:

放大後:

回到目錄






107. 2D雪人繪圖


原始檔:


結果檔:



執行結果:



回到目錄




108. 繪製圖形


原始檔:



結果檔:




執行結果:




回到目錄




109. 畫筆功能


原始檔:



結果檔:




執行結果:

回到目錄




110.問卷調查

原始檔:




結果檔:







執行結果:




Viewing all articles
Browse latest Browse all 99

Trending Articles