Microsoft PowerPoint - course8.ppt

Size: px
Start display at page:

Download "Microsoft PowerPoint - course8.ppt"

Transcription

1 回顧 Java 程式設計基礎班 (8) Java Data Structure 劉根豪台大電機所網路資料庫研究室 Java AWT package Java Swing package Component: 一些 GUI 元件, 如 :Button Label 等 Container: 用來放置 GUI 元件的地方 Container 可分為兩種供使用者使用 : Frame(Window): 一個開出來的視窗 Panel: 放在 Frame 裡的畫布, 一個 Frame 裡可以有多個 Panel 修改自 awt 提供更強大的繪圖元件功能, 以及更穩定的函式庫 Swing Container 可分為兩種供使用者使用 : JFrame(Window): 一個開出來的視窗 JPanel: 放在 JFrame 裡的畫布, 一個 JFrame 裡可以有多個 JPanel 3 4 第一個小程式 JFrame 的使用 JPanel 的使用 見 exercise8_1 見 exercise8_

2 Layout Managers 把元件放在我們希望放置的地方! FlowLayout:Panel 與 Applet 預設使用的 layout 方式 BorderLayout:Windows Dialogs 與 Frames 的預設使用的 layout 方式 GridLayout CardLayout GridBagLayout Null 不設定任何 Layout FlowLayout Manager ㄧ行接著一行 就是說元件一個接著一個的放在上面, 放滿了就會換行, 有點像打字超過一行字數會自動換行般 7 8 public class MyFlow private JFrame f; private JButton btn1, btn2, btn3; public static void main( String args[] ) MyFlow aflow = new MyFlow(); aflow.go(); public void go() f = new JFrame( "FlowLayout Manager" ); // 使用 FlowLayout Manager, 對齊方式靠左,default 對齊方式為置中 f.setlayout( new FlowLayout( FlowLayout.LEFT ) ); btn1 = new JButton( "Button1" ); // 產生三個按鈕 btn2 = new JButton( "Button2" ); btn3 = new JButton( "Button3" ); f.add( btn1 ); // 把 Button 加到 Frame 上 f.add( btn2 ); f.add( btn3 ); f.setsize( 100, 100 ); f.setvisible( true ); 9 10 BorderLayout Manager BorderLayout 包含五種不同區域 : North,South,Ease,West,Center 元件的相對位置不會隨 window size 的改變而改變, 但元件的 size 將可能改變 看個例子 : public class MyBorder private JFrame f; private JButton btnnorth, btnsouth, btneast, btnwest, btncenter; public static void main( String args[] ) MyBorder aborder = new MyBorder(); aborder.go(); [ next ]

3 public void go() f = new JFrame( "BorderLayout Manager" ); //Frame 預設使用 BorderLayout f.setlayout( new BorderLayout() ); // 採用 BorderLayout 的方式來排列元件 btnnorth = new JButton( "ButtonNorth" ); btnsouth = new JButton( "ButtonSouth" ); btneast = new JButton( "ButtonEast" ); btnwest = new JButton( "ButtonWest" ); btncenter = new JButton( "ButtonCenter"); f.add( btnnorth, BorderLayout.NORTH ); // 將五個按鈕分別加在五個位置上 f.add( btnsouth, BorderLayout.SOUTH ); f.add( btneast, BorderLayout.EAST ); f.add( btnwest, BorderLayout.WEST ); f.add( btncenter, BorderLayout.CENTER ); f.setsize( 300, 100 ); f.setvisible( true ); GridLayout Manager 讓你在畫布上打格子, 元件就可以方便的放在特定的位置裡, 每個方格的大小是一樣的 加入順序 : 由左至右 / 由上至下 看個例子 : public class MyGrid private JFrame f; private JButton btn11, btn12, btn13; private JButton btn21, btn22, btn23; public static void main( String args[] ) MyGrid agrid = new MyGrid(); agrid.go(); public void go() f = new JFrame( "GridLayout Manager" ); // 使用 GridLayout 方式排列元件 // 將 Frame 分成 row=3, col=2 的區塊 f.setlayout( new GridLayout( 3, 2 ) ); 15 [ next ] 16 btn11 = new JButton( "Button(1,1)" ); btn12 = new JButton( "Button(1,2)" ); btn13 = new JButton( "Button(1,3)" ); btn21 = new JButton( "Button(2,1)" ); btn22 = new JButton( "Button(2,2)" ); btn23 = new JButton( "Button(2,3)" ); // 將入六個按鈕, 加入順序 : 由左至右 / 由上至下 f.add( btn11 ); f.add( btn12 ); f.add( btn13 ); f.add( btn21 ); f.add( btn22 ); f.add( btn23 ); f.setsize( 300, 200 ); f.setvisible( true );

4 AWT/Swing Component Library Label public class mylabel extends JFrame public static void main( String args[] ) mylabel labelexam = new mylabel( "Label Example" ); JLabel label1 = new JLabel( "Sample" ); p.add( label1 ); labelexam.add( p ); labelexam.setsize( 100, 100 ); labelexam.setvisible( true ); public mylabel( String title ) super (title); Button public class mybutton extends JFrame public static void main( String args[] ) mybutton btnexam = new mybutton( "Button Example" ); JButton btn1 = new JButton( "Sample" ); p.add( btn1 ); btnexam.add( p ); btnexam.setsize( 100, 100 ); btnexam.setvisible( true ); public mybutton( String title ) super (title);

5 Checkbox public class mycheckbox extends Frame public static void main( String args[] ) mycheckbox chkboxexam = new mycheckbox( "CheckBox Example" ); JCheckbox chkbox1 = new JCheckbox( "One", false ); JCheckbox chkbox2 = new JCheckbox( "Two", false ); JCheckbox chkbox3 = new JCheckbox( "Three", true ); p.add( chkbox1 ); p.add( chkbox2 ); p.add( chkbox3 ); chkboxexam.add( p ); chkboxexam.setsize( 300, 100 ); chkboxexam.setvisible( true ); public mycheckbox( String title ) super (title); CheckboxGroup - Radio Button true public class mycheckboxgroup extends JFrame public static void main( String args[] ) mycheckboxgroup radiobtnexam = new mycheckboxgroup("checkbox Example"); JRadioButton radiobtn1 = new JRadioButton( "One"); JRadioButton radiobtn2 = new JRadioButton( "Two"); JRadioButton radiobtn3 = new JRadioButton( "Three"); ButtonGroup bg = new ButtonGroup(); bg.add(radiobtn1); bg.add(radiobtn2); bg.add(radiobtn3); p.add( radiobtn1 ); p.add( radiobtn2 ); p.add( radiobtn3 ); radiobtnexam.add( p ); radiobtnexam.setsize( 3100, 100 ); radiobtnexam.setvisible( true ); public mycheckboxgroup( String title ) super (title);

6 Choice:"select one from this list" public class mychoice extends JFrame public static void main( String args[] ) mychoice choiceexam = new mychoice( "Choice Example" ); String[] items = First, Second, Three ; JComboBox c = new JComboBox(items); p.add( c ); choiceexam.add( p ); choiceexam.setsize( 100, 100 ); choiceexam.setvisible( true ); public mychoice( String title ) super (title); List public class mylist extends JFrame public static void main( String args[] ) mylist listexam = new mylist( "List Example" ); String[] items = First, Second, Third ; JList c = new JList( items); p.add( c ); listexam.add( p ); listexam.setsize( 100, 100 ); listexam.setvisible( true ); public mylist( String title ) super (title);

7 TextField public class mytextfield extends JFrame public static void main( String args[] ) mytextfield txtfieldexam = new mytextfield( "TextField Example" ); JTextField txtfield1 = new JTextField( "Sample", 20 ); p.add( txtfield1 ); txtfieldexam.add( p ); txtfieldexam.setsize( 100, 100 ); txtfieldexam.setvisible( true ); public mytextfield( String title ) super (title); TextArea public class mytextarea extends JFrame public static void main( String args[] ) mytextarea txtareaexam = new mytextarea( "TextArea Example" ); JTextArea txtarea1 = new JTextArea( "Sample", 4, 20 ); p.add( txtarea1 ); txtareaexam.add( p ); txtareaexam.setsize( 100, 100 ); txtareaexam.setvisible( true ); public mytextarea( String title ) super (title);

8 Dialog public class mydialog extends JFrame public static void main( String args[] ) mydialog dialogexam = new mydialog( "Dialog Example" ); JDialog dialog1 = new JDialog( dialogexam, "Sample", false ); dialog1.add( new Label( "Hello, Dialog..." ), BorderLayout.CENTER ); dialog1.pack(); dialog1.setvisible( true ); dialogexam.setsize( 100, 100 ); dialogexam.setvisible( true ); public mydialog( String title ) super (title); FileDialog public class myfiledialog extends JFrame public static void main( String args[] ) myfiledialog fdialogexam = new myfiledialog( "FileDialog Example" ); String fname= ; JFileChooser chooser = new JFileChooser(); int returnval = chooser.showopendialog(parent); if(returnval == JFileChooser.APPROVE_OPTION) fname = chooser.getselectedfile().getname(); Label l1 = new Label( fname ); p.add( l1 ); fdialogexam.add( p ); fdialogexam.setsize( 100, 100 ); fdialogexam.setvisible( true ); public myfiledialog( String title ) super (title);

9 MenuBar Menu MenuItem public class mymenu extends JFrame public static void main( String args[] ) mymenu menuexam = new mymenu( "Menu Bar/Menu/Menu Item" ); JMenuBar mb = new JMenuBar(); JMenu m1 = new JMenu( "File" ); JMenu m2 = new JMenu( "Edit" ); mb.add( m1 ); mb.add( m2 ); JMenuItem m1_open = new JMenuItem( "Open" ); JMenuItem m1_save = new JMenuItem( "Save" ); JMenuItem m1_exit = new JMenuItem( Exit" ); m1.add( m1_open ); m1.add( m1_save ); m1.addseparator(); m1.add( m1_exit ); menuexam.setjmenubar( mb ); menuexam.setsize( 100, 100 ); menuexam.setvisible( true ); 49 public mymenu( String title ) super (title); 50 import java.awt.event.*; public class mypopupmenu extends JFrame implements ActionListener private JButton b; private JPopupMenu pop1; public static void main( String args[] ) mypopupmenu popexam = new mypopupmenu( "PopupMenu Example" ); popexam.setsize( 100, 100 ); popexam.setvisible( true ); [ next page ] 事件處理函式 GUI Controls 和 Listeners GUI 事件驅動模型 GUI 事件發生時再通知我 包括移動滑鼠 按鍵或輸入資料等等 java.awt.awtevent 三要素 Source Buttons 等 GUI 控制 Listener 想要知道控制何時被操作的物件 通知訊息 訊息從 Source 送到 Listener 來當作事件已經發生的通知 註冊 Callback 函式

10 Listeners 和 Interface java.awt.awtevent 物件可能對多個事件有興趣 實現多重 listener 介面 一旦物件實現 listener 介面就可以被加到 source source.addlistener(listener l) 介面是實現 Listener 模型的關鍵 Object EventObject AWTEvent ActionEvent AdjustmentEvent ItemEvent TextEvent ComponentEvent KeyEvent ContainerEvent FocusEvent PaintEvent WindowEvent InputEvent MouseEvent MouseWheelEvent Source-Listener 的互動 Listener Interface addlistener Listener ActionListener Interface 聆聽 JButton 的物件必須實現 ActionListener Listener Source addlistener Notification of event public interface ActionListener extends EventListener /** * Invoked when an action occurs. */ public void actionperformed(actionevent e); Notification Prototype source.addxxx(listener) 介面 ActionListener 定義 message prototype JButton 送出的訊息 ActionEvent 參數包括額外資訊 來源物件 (e.getsource()) 發生時間 鍵盤組合鍵 Listener 向 Source 登記來建立關係 Example: button.addactionlistener(listener) Listener 必須實現 ActionListener 介面 必須回應 button 將會送出的訊息 public void actionperformed(actionevent e);

11 Event Notification 當動作發生時 Button is clicked Source 發送通知給每一個 Listener JButton 發送 actionperformed() 訊息給每一個 listener Using a Button and a Listener #1 Component implements ActionListener The component could implement the ActionListener interface directly Register this as the listener object class MyComponent extends JComponent implements ActionListener... // in the JComponent ctor button.addactionlistener(this); Using a Button and a Listener #2 Anonymous Inner class Create an inner class Create a MyListener inner class which implements ActionListener Create a new MyListener object Add it via button.addxxx(listener) // in the JComponent ctor ActionListener listener = new MyActionListener(); button.addactionlistener(listener); Most common method! Create an Anonymous Inner Class that implements the interface Can be created on the fly inside the method! button = new JButton("Beep"); panel.add(button); button.addactionlistener( new ActionListener() public void actionperformed(actionevent e) Toolkit.getDefaultToolkit().beep(); ); Button Listener Example ButtonListener Example Code // ListenerFrame.java import javax.swing.event.*; import java.awt.event.*; /* Demonstrates bringing up a frame with a couple of buttons in it. Demonstrates using anonymous inner class listener. */ public class ListenerFrame extends JFrame private JLabel label;

12 Button Listener Example Button Listener Example public ListenerFrame() super("listenerframe"); JComponent content = (JComponent) getcontentpane(); content.setlayout(new FlowLayout()); JButton button = new JButton("Beep!"); content.add(button); // 2. Add the listener to the button button.addactionlistener(listener); // ---- // Creating a listener in 1 step... // ---- // Creating an action listener in 2 steps... // 1. Create an inner class subclass of ActionListener ActionListener listener = new ActionListener() public void actionperformed(actionevent e) Toolkit.getDefaultToolkit().beep(); ; // Create a little panel to hold a button // and a label JPanel panel = new JPanel(); content.add(panel); JButton button2 = new JButton("Yay!"); label = new JLabel("Woo Hoo"); panel.add(button2); panel.add(label); Button Listener Example // This listener adds a "!" to the label. button2.addactionlistener( new ActionListener() public void actionperformed(actionevent e) String text = label.gettext(); label.settext(text + "!"); // note: we have access to "label" of outer class // we do not have access to local vars like 'panel', // unless they are declared final. ); Misc. Listeners JCheckBox Uses ActionListener, like JButton Responds to boolean isselected() to see if it is currently checked pack(); setvisible(true); PopupMenu public mypopupmenu( String title ) super (title); pop1 = new JPopupMenu( "Popup Sample" ); JMenuItem s = new JMenuItem( "Save" ); JMenuItem l = new JMenuItem( "Load" ); b = new JButton( "Press me" ); add( b, "Center" ); b.addactionlistener( this ); pop1.add( s ); pop1.add( l ); add( pop1 ); public void actionperformed( ActionEvent ev ) pop1.show( b, 10, 10 );

13 Color Controlling 設定 component 的顏色 setforeground(): 設定前景顏色 setbackgroud(): 設定背景顏色 自訂顏色 : RGB 三個參數 Red, Green, Blue, 範圍 :0 ~ 255 int r=255, g=255, b=0; Color c = new Color( r, g, b ); public class mycolor extends Frame public static void main( String args[] ) mycolor btnexam = new mycolor( "Color Example" ); Color newcolor = new Color( 200, 100, 0 ); Button btn1 = new Button( "Color ForeGround Green" ); Button btn2 = new Button( "Color BackGround Blue" ); Button btn3 = new Button( "Color BackGround User Define(200, 100, 0)" ); btn1.setforeground( Color.yellow ); btn2.setbackground( Color.blue ); btn3.setbackground( newcolor ); p.add( btn1 ); p.add( btn2 ); p.add( btn3 ); btnexam.add( p ); btnexam.setsize( 100, 100 ); btnexam.setvisible( true ); public mycolor( String title ) super (title); public class myfont extends Frame public static void main( String args[] ) myfont btnexam = new myfont( "Font Example" ); Font f1 = new Font( "Dialog", Font.BOLD, 25 ); Font f2 = new Font( "Courier", Font.ITALIC, 35 ); Font f3 = new Font( "TimesRoman", Font.PLAIN, 45 ); Button btn1 = new Button( "Font Dialog/BOLD/25 " ); Button btn2 = new Button( "Font Courier/ITALIC/35" ); Button btn3 = new Button( "Font TimesRoman/PLAIN/45" ); btn1.setfont( f1 ); btn2.setfont( f2 ); btn3.setfont( f3 ); p.add( btn1 ); p.add( btn2 ); p.add( btn3 ); btnexam.add( p ); btnexam.setsize( 100, 100 ); btnexam.setvisible( true ); public myfont( String title ) super (title); Font Controlling 設定 component 上的字體, 包括 (Font Name/Style/Size)

14 79 14

Microsoft PowerPoint ppt

Microsoft PowerPoint ppt Java 程式設計基礎班 (8) 莊坤達台大電信所網路資料庫研究室 Email: doug@arbor.ee.ntu.edu.tw Class 8 1 回顧 Java Data Structure Class 8 2 Java AWT package Component: 一些 GUI 元件, 如 : Button Label 等 Container: 用來放置 GUI 元件的地方 Container

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes (Swing) AWTEvent Font LayoutManager 1 Classes in the javax.swing package Heavyweight FontMetrics Object Color Panel Applet JApplet Graphics Component Container Window Frame JFrame * Dialog JDialog JComponent

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes What is a JavaBean? JavaBean Java JavaBean Java JavaBean JComponent tooltiptext font background foreground doublebuffered border preferredsize minimumsize maximumsize JButton. Swing JButton JButton() JButton(String

More information

Swing-02.pdf

Swing-02.pdf 2 J B u t t o n J T e x t F i e l d J L i s t B u t t o n T e x t F i e l d L i s t J F r a m e 21 2 2 Swing C a n v a s C o m p o n e n t J B u t t o n AWT // ToolbarFrame1.java // java.awt.button //

More information

PowerPoint 簡報

PowerPoint 簡報 Paint 繪圖板 JAVA 程式設計 指導老師 : 鄞宗賢 組員 : 4A3G0901 劉彥佐 4A3G0907 韓偉志 畫面預覽 匯入參數 package paint; import java.awt.*; import java.awt.event.*; import javax.swing.*; 主程式 public class paint{ public static void main(string[]

More information

Microsoft PowerPoint - ch6 [相容模式]

Microsoft PowerPoint - ch6 [相容模式] UiBinder wzyang@asia.edu.tw UiBinder Java GWT UiBinder XML UI i18n (widget) 1 2 UiBinder HelloWidget.ui.xml: UI HelloWidgetBinder HelloWidget.java XML UI Owner class ( Composite ) UI XML UiBinder: Owner

More information

(CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787

(CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787 Web (CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787 1092 1/ 16 30.75 748 2005 1 1 2005 1 1 : 1 3 100

More information

Mac Java import com.apple.mrj.*;... public class MyFirstApp extends JFrame implements ActionListener, MRJAboutHandler, MRJQuitHandler {... public MyFirstApp() {... MRJApplicationUtils.registerAboutHandler(this);

More information

untitled

untitled OGRE http://antsam.blogone.net AntsamCGD@hotmail.com OGRE OGRE listener listener target listener target Dispatcher Processor Input Reader Event class view Event Class view Input Event ctrlaltshift ascoll

More information

<4D F736F F F696E74202D C DB5DA3132D5C25FCDBCD0CED3C3BBA7BDE7C3E6BBF9B4A12E BBCE6C8DDC4A3CABD5D>

<4D F736F F F696E74202D C DB5DA3132D5C25FCDBCD0CED3C3BBA7BDE7C3E6BBF9B4A12E BBCE6C8DDC4A3CABD5D> 第 12 章图形用户界面基础 1 动因 为 Java GUI 程序设计而设计的 API 是如何应用面向对象 原则的绝佳范例 从本章开始将学习 Java GUI API 的框 架结构, 还要学习如何使用 GUI 组件为应用程序和 applet 开发用户友好接口 2 学习目标 区分 Swing 和 AWT 的不同 ( 第 12.2 节 ) 描述 Java GUI API 的层次体系结构 ( 第 12.3

More information

新・解きながら学ぶJava

新・解きながら学ぶJava 481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Java application Java main applet Web applet Runnable Thread CPU Thread 1 Thread 2 Thread 3 CUP Thread 1 Thread 2 Thread 3 ,,. (new) Thread (runnable) start( ) CPU (running) run ( ) blocked CPU sleep(

More information

java2d-4.PDF

java2d-4.PDF 75 7 6 G r a d i e n t P a i n t B a s i c S t r o k e s e t P a i n t ( ) s e t S t o r k e ( ) import java.awt.*; import java.awt.geom.*; public class PaintingAndStroking extends ApplicationFrame { public

More information

2009年3月全国计算机等级考试二级Java语言程序设计笔试试题

2009年3月全国计算机等级考试二级Java语言程序设计笔试试题 2009 年 3 月 全 国 计 算 机 等 级 考 试 笔 试 试 卷 二 级 Java 语 言 程 序 设 计 ( 考 试 时 间 90 分 钟, 满 分 100 分 ) 一 选 择 题 ( 每 题 2 分, 共 70 分 ) 下 列 各 题 A) B) C) D) 四 个 选 项 中, 只 有 一 个 选 项 是 正 确 的 请 将 正 确 选 项 填 涂 在 答 题 卡 相 应 位 置 上,

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 310-065Big5 Title : Sun Certified Programmer for the Java 2 Platform, SE 6.0 Version : Demo 1 / 14 1. 35. String #name = "Jane Doe"; 36. int

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Fortran Algol Pascal Modula-2 BCPL C Simula SmallTalk C++ Ada Java C# C Fortran 5.1 message A B 5.2 1 class Vehicle subclass Car object mycar public class Vehicle extends Object{ public int WheelNum

More information

基于CDIO一体化理念的课程教学大纲设计

基于CDIO一体化理念的课程教学大纲设计 Java 语 言 程 序 设 计 课 程 教 学 大 纲 Java 语 言 程 序 设 计 课 程 教 学 大 纲 一 课 程 基 本 信 息 1. 课 程 代 码 :52001CC022 2. 课 程 名 称 :Java 语 言 程 序 设 计 3. 课 程 英 文 名 称 :Java Programming 4. 课 程 类 别 : 理 论 课 ( 含 实 验 上 机 或 实 践 ) 5. 授

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

<4D F736F F F696E74202D20B5DA37D5C2204A617661B5C4CDBCD0CED3EBD3C3BBA7BDE7C3E62E BBCE6C8DDC4A3CABD5D>

<4D F736F F F696E74202D20B5DA37D5C2204A617661B5C4CDBCD0CED3EBD3C3BBA7BDE7C3E62E BBCE6C8DDC4A3CABD5D> 第 7 章 Java 的图形与用户界面 7.1 概述 7.2 底层容器类 JFrame 和 JApplet 7.3 容器的布局 74 7.4 字体和颜色的使用 7.1 概述 利用 Java 中的图形 图像和重要的图形界面组件 (Componet) p 可以实现不同外观要求的窗口 图形和交互方式 1.java.awt awt 包 AWT 是抽象窗口工具集 Abstract Window Toolkit

More information

Microsoft Word - Broker.doc

Microsoft Word - Broker.doc Broker 模式 采用 broker 模式对分布式计算进行简单模拟 系统在一个进程内模拟分布式环境, 因此不涉及网络编程和进程间通信,Broker 通过本地函数调用的方式实现 request 和 response 的转发 采用 broker 模式对分布式计算进行简单的模拟, 要求如下 : 设计四个 server, 一个 server 接收两个整数, 求和并返回结果, 一个 server 接收两个整数,

More information

詞 彙 表 編 號 詞 彙 描 述 1 預 約 人 資 料 中 文 姓 名 英 文 姓 名 身 份 證 字 號 預 約 人 電 話 性 別 2 付 款 資 料 信 用 卡 別 信 用 卡 號 信 用 卡 有 效 日 期 3 住 房 條 件 入 住 日 期 退 房 日 期 人 數 房 間 數 量 入

詞 彙 表 編 號 詞 彙 描 述 1 預 約 人 資 料 中 文 姓 名 英 文 姓 名 身 份 證 字 號 預 約 人 電 話 性 別 2 付 款 資 料 信 用 卡 別 信 用 卡 號 信 用 卡 有 效 日 期 3 住 房 條 件 入 住 日 期 退 房 日 期 人 數 房 間 數 量 入 100 年 特 種 考 試 地 方 政 府 公 務 人 員 考 試 試 題 等 別 : 三 等 考 試 類 科 : 資 訊 處 理 科 目 : 系 統 分 析 與 設 計 一 請 參 考 下 列 旅 館 管 理 系 統 的 使 用 案 例 圖 (Use Case Diagram) 撰 寫 預 約 房 間 的 使 用 案 例 規 格 書 (Use Case Specification), 繪 出 入

More information

D C 93 2

D C 93 2 D9223468 3C 93 2 Java Java -- Java UML Java API UML MVC Eclipse API JavadocUML Omendo PSPPersonal Software Programming [6] 56 8 2587 56% Java 1 epaper(2005 ) Java C C (function) C (reusability) eat(chess1,

More information

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2.

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2. 2005-06 p.1 HTML HyperText Mark-up Language 1. HTML Logo, Pascal, C++, Java HTML 2. HTML (tag) 3. HTML 4. HTML 1. HTML 2. 3. FTP HTML HTML html 1. html html html cutehtmleasyhtml 2. wyswyg (What you see

More information

第1章

第1章 第 18 章 Swing 1 本章提要 18.1 前言 18.2 Swing 介紹 18.3 視窗元件 18.3.1 JFrame 18.3.2 Content Pane 18.3.3 Menu Bar 18.4 Swing 元件 18.4.1 JCheckBox JRadioButton JComboBox 18.4.2 JTextField JPasswordField 18.4.3 JTable

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 310-055Big5 Title : Sun Certified Programmer for the Java 2 Platform.SE 5.0 Version : Demo 1 / 22 1. 11. public static void parse(string str)

More information

INTRODUCTION TO COM.DOC

INTRODUCTION TO COM.DOC How About COM & ActiveX Control With Visual C++ 6.0 Author: Curtis CHOU mahler@ms16.hinet.net This document can be freely release and distribute without modify. ACTIVEX CONTROLS... 3 ACTIVEX... 3 MFC ACTIVEX

More information

epub 94-3

epub 94-3 3 A u t o C A D L AY E R L I N E T Y P E O S N A P S T Y L E X R E F - AutoLISP Object ARX A u t o C A D D C L A u t o C A D A u t o d e s k P D B D C L P D B D C L D C L 3.1 Wi n d o w s A u t o C A D

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

Adobe® Flash® 的 Adobe® ActionScript® 3.0 程式設計

Adobe® Flash® 的 Adobe® ActionScript® 3.0 程式設計 337 18 Adobe Flash CS4 Professional MovieClip ActionScript Flash ActionScript Flash Flash Flash MovieClip MovieClip ActionScript ( ) MovieClip Flash Sprite ActionScript MovieClip ActionScript 3.0 Shape

More information

ZW1.PDF

ZW1.PDF C. A. R. Hoare, The Emperor s Old Clothes Java C++ Objective C Eiffel Smalltalk Mesa Lisp Java Java Java C++ Java 10 Item 1 Item 2 String.equals() == 1 1 Item 3 Java C++ Java Item 4 Java Item 5 Java Item

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

Microsoft PowerPoint - ch02

Microsoft PowerPoint - ch02 第 一 篇 基 礎 圖 文 動 畫 (Basic Graphics / Animation) 2 1 簡 介 2 2 Frame Class 2 3 執 行 緒 繪 圖 流 程 2 4 Font Class 2 5 Color Class 2 6 中 文 處 理 2 7 習 題 (Exercises) 第 二 章 文 字 繪 製 (Words) 2 1 簡 介 本 書 探 討 的 是 動 畫 遊 戲,

More information

Microsoft Word - ch04三校.doc

Microsoft Word - ch04三校.doc 4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear

More information

1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6:

1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6: Chapter 15. Suppressed Exception CH14 Finally Block Java SE 7 try-with-resources JVM cleanup try-with-resources JVM cleanup cleanup Java SE 7 Throwable getsuppressed Throwable[] getsuppressed() Suppressed

More information

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class 踩地雷遊戲 高慧君南港高中 開啟專案 MineSweep 任務一 : 產生 30X20 個磚塊編輯 Table 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.util.arraylist; Write a description of class MyWorld

More information

EJB-Programming-4-cn.doc

EJB-Programming-4-cn.doc EJB (4) : (Entity Bean Value Object ) JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Session Bean J2EE Session Façade Design Pattern Session Bean Session

More information

Windows XP

Windows XP Windows XP What is Windows XP Windows is an Operating System An Operating System is the program that controls the hardware of your computer, and gives you an interface that allows you and other programs

More information

第1章

第1章 第 17 章 有來有往 互動式視窗程式 1 本章提要 17.1 前言 17.2 元件 Event 觸發 17.3 Event 監聽者 Listener 17.4 Event 接收者 Adapter 17.5 Event 類別及提供的函式 17.5.1 MouseEvent 17.5.2 KeyEvent 17.5.3 TextEvent 17.5.4 WindowEvent 17.5.5 其他 Event

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

K7VT2_QIG_v3

K7VT2_QIG_v3 ............ 1 2 3 4 5 [R] : Enter Raid setup utility 6 Press[A]keytocreateRAID RAID Type: JBOD RAID 0 RAID 1: 2 7 RAID 0 Auto Create Manual Create: 2 RAID 0 Block Size: 16K 32K

More information

Microsoft Word - 第3章.doc

Microsoft Word - 第3章.doc Java C++ Pascal C# C# if if if for while do while foreach while do while C# 3.1.1 ; 3-1 ischeck Test() While ischeck while static bool ischeck = true; public static void Test() while (ischeck) ; ischeck

More information

untitled

untitled 1 .NET 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Response 類 Write 料 Redirect URL Response.Write("!! ives!!"); Response.Redirect("WebForm2.aspx"); (1) (2) Web Form

More information

Microsoft Word - template.doc

Microsoft Word - template.doc HGC efax Service User Guide I. Getting Started Page 1 II. Fax Forward Page 2 4 III. Web Viewing Page 5 7 IV. General Management Page 8 12 V. Help Desk Page 13 VI. Logout Page 13 Page 0 I. Getting Started

More information

untitled

untitled 4.1AOP AOP Aspect-oriented programming AOP 來說 AOP 令 理 Cross-cutting concerns Aspect Weave 理 Spring AOP 來 AOP 念 4.1.1 理 AOP AOP 見 例 來 例 錄 Logging 錄 便 來 例 行 留 錄 import java.util.logging.*; public class HelloSpeaker

More information

Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0,

Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, http://debut.cis.nctu.edu.tw/~chi Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, : POSITIVE_INFINITY NEGATIVE_INFINITY

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

Learning Java

Learning Java Java Introduction to Java Programming (Third Edition) Prentice-Hall,Inc. Y.Daniel Liang 2001 Java 2002.2 Java2 2001.10 Java2 Philip Heller & Simon Roberts 1999.4 Java2 2001.3 Java2 21 2002.4 Java UML 2002.10

More information

JavaIO.PDF

JavaIO.PDF O u t p u t S t ream j a v a. i o. O u t p u t S t r e a m w r i t e () f l u s h () c l o s e () public abstract void write(int b) throws IOException public void write(byte[] data) throws IOException

More information

javaexample-02.pdf

javaexample-02.pdf n e w. s t a t i c s t a t i c 3 1 3 2 p u b l i c p r i v a t e p r o t e c t e d j a v a. l a n g. O b j e c t O b j e c t Rect R e c t x 1 y 1 x 2 y 2 R e c t t o S t r i n g ( ) j a v a. l a n g. O

More information

VB程序设计教程

VB程序设计教程 高 等 学 校 教 材 Visual Basic 程 序 设 计 教 程 魏 东 平 郑 立 垠 梁 玉 环 石 油 大 学 出 版 社 内 容 提 要 本 书 是 按 高 等 学 校 计 算 机 程 序 设 计 课 程 教 学 大 纲 编 写 的 大 学 教 材, 主 要 包 括 VB 基 础 知 识 常 用 程 序 结 构 和 算 法 Windows 用 户 界 面 设 计 基 础 文 件 处

More information

E3. 最 大 公 因 數 問 題 描 述 : 寫 一 程 式 求 兩 數 之 最 大 公 因 數 利 用 TextField 元 件 輸 入 正 整 數 M, N (1 N M 9999), 按 下 compute 按 鈕 後 計 算 正 整 數 M, N 的 最 大 公 因 數, 並 顯 示 於

E3. 最 大 公 因 數 問 題 描 述 : 寫 一 程 式 求 兩 數 之 最 大 公 因 數 利 用 TextField 元 件 輸 入 正 整 數 M, N (1 N M 9999), 按 下 compute 按 鈕 後 計 算 正 整 數 M, N 的 最 大 公 因 數, 並 顯 示 於 資 管 系 程 式 設 計 (2) 會 考 題 庫 易 E1. 陣 列 相 加 問 題 描 述 : 請 使 用 TextField 元 件 讓 使 用 者 輸 入 二 個 2x2 的 陣 列 內 容, 當 按 下 +/-/* 按 鈕 後, 接 收 兩 個 陣 列 並 進 行 加 / 減 / 乘 法 運 算, 再 將 其 結 果 顯 示 在 = 後 面 的 TextField 元 件 上 E2. 數

More information

[Short Essay:] 1. (5 points) Use state-of-memory diagram to describe the differences between x and y declared as follows: double[] x = new double[4];

[Short Essay:] 1. (5 points) Use state-of-memory diagram to describe the differences between x and y declared as follows: double[] x = new double[4]; Introduction to Programming (II) Spring 2008, Final Exam Name: ID Number: [True/False:] (5 points each) If your answer is "false", you have to provide correct reasons. Otherwise, no points will be given.

More information

JBuilder Weblogic

JBuilder Weblogic JUnit ( bliu76@yeah.net) < >6 JUnit Java Erich Gamma Kent Beck JUnit JUnit 1 JUnit 1.1 JUnit JUnit java XUnit JUnit 1.2 JUnit JUnit Erich Gamma Kent Beck Erich Gamma Kent Beck XP Extreme Programming CRC

More information

WWW PHP

WWW PHP WWW PHP 2003 1 2 function function_name (parameter 1, parameter 2, parameter n ) statement list function_name sin, Sin, SIN parameter 1, parameter 2, parameter n 0 1 1 PHP HTML 3 function strcat ($left,

More information

untitled

untitled 1 Outline 類别 欄 (1) 類 類 狀 更 易 類 理 若 類 利 來 利 using 來 namespace 類 ; (2) namespace IBM class Notebook namespace Compaq class Notebook 類别 類 來 類 列 欄 (field) (property) (method) (event) 類 例 立 來 車 類 類 立 車 欄 料

More information

麻 省 理 工 學 院 是 在 西 元 2013 年 12 月 3 日 推 出 MIT App Inventor 2 網 站, 提 供 免 費 的 雲 端 服 務, 使 用 者 可 以 透 過 瀏 覽 器 來 開 發 Android 裝 置 應 用 程 式, 該 網 站 的 網 址 為 : http

麻 省 理 工 學 院 是 在 西 元 2013 年 12 月 3 日 推 出 MIT App Inventor 2 網 站, 提 供 免 費 的 雲 端 服 務, 使 用 者 可 以 透 過 瀏 覽 器 來 開 發 Android 裝 置 應 用 程 式, 該 網 站 的 網 址 為 : http 資 訊 學 科 中 心 6 月 份 電 子 報 用 MIT App Inventor2 程 式 拼 圖 來 開 發 Android 裝 置 應 用 程 式 李 啟 龍 學 習 Android 裝 置 程 式 設 計, 可 以 不 必 學 習 較 為 艱 澀 的 Java 語 法, 只 要 使 用 拼 圖 模 式 來 組 合 程 式, 就 可 以 完 成 Android 裝 置 的 應 用 程 式 MIT

More information

EJB-Programming-3.PDF

EJB-Programming-3.PDF :, JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Value Object Design Pattern J2EE Design Patterns Value Object Value Object Factory J2EE EJB Test Client

More information

影視後製全攻略 Premiere Pro After Effects Encore 自序 Adobe Premiere Pro After Effects Encore 2008 Adobe CS Adobe CS5 Adobe CS4 Premiere Pro After Effect

影視後製全攻略 Premiere Pro After Effects Encore 自序 Adobe Premiere Pro After Effects Encore 2008 Adobe CS Adobe CS5 Adobe CS4 Premiere Pro After Effect 自序 Adobe Premiere Pro After Effects Encore 2008 Adobe CS3 2010 Adobe CS5 Adobe CS4 Premiere Pro After Effects Encore 18 ii Tony Cathy 2010/8 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 iii Premiere

More information

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 Java V1.0.1 2007 4 10 1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 6.2.10 6.3..10 6.4 11 7.12 7.1

More information

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO Car DVD New GUI IR Flow User Manual V0.1 Jan 25, 2008 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com Important Notice SUNPLUS

More information

untitled

untitled Work Managers 什 Work Managers? WebLogic Server 9.x 行 (thread) 理 thread pool 數量 立 execute queues 來 量 理 thread count, thread priority 參數 理 thread pool 數量? WebLogic Server 9.x 理 行 (thread) (self-tuning) 句

More information

ebook 86-15

ebook 86-15 15 G t k + d e l e t e _ e v e n t G n o m e G n o m e 15.1 GnomeDialog G t k + G n o m e D i a l o g 15.1.1 G n o m e D i a l o g g n o m e _ d i a l o g _ n e w ( ) G N O M E _ D I A L O G ( d i a l

More information

Java 1 Java String Date

Java 1 Java String Date JAVA SCJP Java 1 Java String Date 1Java 01 Java Java 1995 Java Java 21 Java Java 5 1-1 Java Java 1990 12 Patrick Naughton C++ C (Application Programming Interface API Library) Patrick Naughton NeXT Stealth

More information

使 用 Java 语 言 模 拟 保 险 箱 容 量 门 板 厚 度 箱 体 厚 度 属 性 锁 具 类 型 开 保 险 箱 关 保 险 箱 动 作 存 取 款

使 用 Java 语 言 模 拟 保 险 箱 容 量 门 板 厚 度 箱 体 厚 度 属 性 锁 具 类 型 开 保 险 箱 关 保 险 箱 动 作 存 取 款 JAVA 程 序 设 计 ( 肆 ) 徐 东 / 数 学 系 使 用 Java 语 言 模 拟 保 险 箱 容 量 门 板 厚 度 箱 体 厚 度 属 性 锁 具 类 型 开 保 险 箱 关 保 险 箱 动 作 存 取 款 使 用 Java class 代 表 保 险 箱 public class SaveBox 类 名 类 类 体 实 现 封 装 性 使 用 class SaveBox 代 表 保

More information

ebook

ebook 26 JBuilder RMI Java Remote Method Invocation R M I J a v a - - J a v a J a v J a v a J a v a J a v a R M I R M I ( m a r s h a l ) ( u n m a r c h a l ) C a ff e i n e J a v a j a v a 2 i i o p J a v

More information

[ 13 年 12 月 06 日, 下 午 6 点 24 分 ] Intel Hosts 新 加 入 的 同 学 们, 快 去 听 听 在 线 宣 讲 会 哦, 同 时 完 成 页 面 下 方 有 奖 调 查, 就 有 资 格 参 与 大 奖 抽 取 啦! [ 13 年 12 月 06 日, 下 午

[ 13 年 12 月 06 日, 下 午 6 点 24 分 ] Intel Hosts 新 加 入 的 同 学 们, 快 去 听 听 在 线 宣 讲 会 哦, 同 时 完 成 页 面 下 方 有 奖 调 查, 就 有 资 格 参 与 大 奖 抽 取 啦! [ 13 年 12 月 06 日, 下 午 China Career Fair: To Know a Different Intel Time Participants Chat Transcript [ 13 年 12 月 06 日, 下 午 6 点 00 分 ] Participant Hi [ 13 年 12 月 06 日, 下 午 6 点 00 分 ] Intel Hosts 大 家 好! [ 13 年 12 月 06 日, 下 午

More information

untitled

untitled 1 LinkButton LinkButton 連 Button Text Visible Click HyperLink HyperLink 來 立 連 Text ImageUrl ( ) NavigateUrl 連 Target 連 _blank _parent frameset _search _self 連 _top 例 sample2-a1 易 連 private void Page_Load(object

More information

MATLAB介紹

MATLAB介紹 MATLAB 2008a GUIDE GUIDE GUIDE Graphic User Interface Design Environment Graphical User Interface GUI GUIDE 令 拉 見 GUIDE 不 GUI GUI 行 率 GUIDE MATLAB 7.x GUIDE 令 guide GUIDE GUIDE Create New GUI Blank GUI

More information

Microsoft Word - 正文.doc

Microsoft Word - 正文.doc 单元七 Java GUI 应用程序开发 1.AWT 及其图形界面组件 2.AWT 布局管理器 3.AWT 事件处理机制 案例 7-1 登录窗口 登录窗口是很多应用系统中不可缺少的组成部分 通过验证用户输入的用户名和密码, 决定是否允许用户进入系统, 在一定程度上保证系统的安全 本案例设计一个登录窗口, 运行 界面如图 7-1 所示 图 7-1 案例 7-1 登录窗口 众所周知, 拥有图形用户界面的计算机应用程序生动

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

Topic

Topic 二 级 JAVA 上 机 试 题 汇 编 第 01 套 : 1. 基 本 操 作 (1 小 题, 计 30 分 ) 在 考 生 文 件 夹 中 存 有 文 件 名 为 Java_1.java 的 文 件, 该 程 序 是 不 完 整 的, 请 在 注 释 行 //**********Found********** 下 一 行 语 句 的 下 划 线 地 方 填 入 正 确 内 容, 然 后 删 除

More information

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10 Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10 Ác Åé å Serial ATA ( Silicon Image SiI3114) S A T A (1) SATA (2)

More information

图形用户界面 (GUI) 设计

图形用户界面 (GUI) 设计 2013-2014 学年度第二学期课程 C 语言程序设计 Java 语言程序设计面向过程编程方法 编程方法学 新疆农业大学计算机与信息工程学院 陈燕红 :cyh@xjau.edu.cn 图形用户界面 (GUI) 设计 参考 C:\Program Files\Java\jdk1.6.0_10\demo 教学内容 1 Java 图形用户界面设计概述 2 3 4 AWT 组件集 事件处理 Swing

More information

2 Java 语 言 程 序 设 计 教 程 1.2.1 简 单 性 Java 语 言 的 语 法 与 C 语 言 和 C++ 语 言 很 接 近, 使 得 大 多 数 程 序 员 很 容 易 学 习 和 使 用 Java 另 一 方 面,Java 丢 弃 了 C++ 中 很 少 使 用 的 很 难

2 Java 语 言 程 序 设 计 教 程 1.2.1 简 单 性 Java 语 言 的 语 法 与 C 语 言 和 C++ 语 言 很 接 近, 使 得 大 多 数 程 序 员 很 容 易 学 习 和 使 用 Java 另 一 方 面,Java 丢 弃 了 C++ 中 很 少 使 用 的 很 难 第 1 章 Java 概 述 Java 的 诞 生 Java 的 特 点 Java 开 发 环 境 安 装 与 配 置 创 建 并 运 行 一 个 简 单 的 Java 程 序 Java 语 言 是 当 今 计 算 机 软 件 行 业 中 最 热 门 的 网 络 编 程 语 言, 以 Java 为 核 心 的 芯 片 技 术 编 译 技 术 数 据 库 连 接 技 术, 以 及 基 于 企 业 级

More information

Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream Class java.io.datainptstream (extends) FilterInputStream InputStream Obj

Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream Class java.io.datainptstream (extends) FilterInputStream InputStream Obj Message Transition 5-1 5-2 DataInputStream Class 5-3 DataOutputStream Class 5-4 PrintStream Class 5-5 (Message Transition) (Exercises) Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream

More information

授课内容 内容 图形界面与控制台应用的区别 (Console Application) 第 6 章图形用户界面图形用户界面 (Graphical User Interface,GUI), 使用图形方式借助菜单 按钮等标准界面元素和键盘 鼠标操作, 实现人机交互 内容和要求 : 掌握 Java Swi

授课内容 内容 图形界面与控制台应用的区别 (Console Application) 第 6 章图形用户界面图形用户界面 (Graphical User Interface,GUI), 使用图形方式借助菜单 按钮等标准界面元素和键盘 鼠标操作, 实现人机交互 内容和要求 : 掌握 Java Swi 金陵科技学院教案 第 9 10 11 次课授课学时 6 教案完成时间 : 2014.2 章 节 第六章图形用户界面 6-1 AWT 组件及其属性类 6-2 事件处理 6-3 Swing 组件及事件 6-4 图形图像 ( 以自学为主 ) 1. AWT 组件及其属性类 主要内容 2. 事件处理 3. Swing 组件及事件 4. 图形图像 目的与要求 1. 掌握 Java Swing 组件的使用方法,

More information

エスポラージュ株式会社 住所 : 東京都江東区大島 東急ドエルアルス大島 HP: ******************* * 关于 Java 测试试题 ******

エスポラージュ株式会社 住所 : 東京都江東区大島 東急ドエルアルス大島 HP:  ******************* * 关于 Java 测试试题 ****** ******************* * 关于 Java 测试试题 ******************* 問 1 运行下面的程序, 选出一个正确的运行结果 public class Sample { public static void main(string[] args) { int[] test = { 1, 2, 3, 4, 5 ; for(int i = 1 ; i System.out.print(test[i]);

More information

(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit

(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit Tomcat Web JUnit Cactus JUnit Java Cactus JUnit 26.1 JUnit Java JUnit JUnit Java JSP Servlet JUnit Java Erich Gamma Kent Beck xunit JUnit boolean JUnit Java JUnit Java JUnit Java 26.1.1 JUnit JUnit How

More information

untitled

untitled How to using M-Power Report API M-Power Report API 力 了 M-Power Report -- Java (Library) M-Power Report API 行 Java M-Power Report M-Power Report API ( 30 ) PDF/HTML/CSV/XLS JPEG/PNG/SVG 料 料 OutputStream

More information

SDS 1.3

SDS 1.3 Applied Biosystems 7300 Real-Time PCR System (With RQ Study) SDS 1.3 I. ~ I. 1. : Dell GX280 2.8GHz with Dell 17 Flat monitor 256 MB RAM 40 GB hard drive DVD-RW drive Microsoft Windows XP Operating System

More information

WinMDI 28

WinMDI 28 WinMDI WinMDI 2 Region Gate Marker Quadrant Excel FACScan IBM-PC MO WinMDI WinMDI IBM-PC Dr. Joseph Trotter the Scripps Research Institute WinMDI HP PC WinMDI WinMDI PC MS WORD, PowerPoint, Excel, LOTUS

More information

untitled

untitled Ogre Rendering System http://antsam.blogone.net AntsamCGD@hotmail.com geometry systemmaterial systemshader systemrendering system API API DirectX OpenGL API Pipeline Abstraction API Pipeline Pipeline configurationpipeline

More information

Microsoft PowerPoint - 18_Event.pptx

Microsoft PowerPoint - 18_Event.pptx 第十八章事件處理 認識 Java 的委派事件模式認識並學習使用各種事件處理學習各種物件的事件處理 1 18.1 委派事件模式 委派事件 指當事件發生時, 產生事件的物件會把 訊息 轉給 事件傾聽者 (event listener) 處理 下圖說明 委派事件模式 的運作流程 : 2 簡單的範例 18.1 委派事件模式 視窗內加入按鈕, 尚未加入事件的處理之程式 : 視窗內有一按鈕, 當此按鈕按下時,

More information

基于ECO的UML模型驱动的数据库应用开发1.doc

基于ECO的UML模型驱动的数据库应用开发1.doc ECO UML () Object RDBMS Mapping.Net Framework Java C# RAD DataSetOleDbConnection DataGrod RAD Client/Server RAD RAD DataReader["Spell"].ToString() AObj.XXX bug sql UML OR Mapping RAD Lazy load round trip

More information

02

02 Thinking in C++: Volume One: Introduction to Standard C++, Second Edition & Volume Two: Practical Programming C++ C C++ C++ 3 3 C C class C++ C++ C++ C++ string vector 2.1 interpreter compiler 2.1.1 BASIC

More information

ebook111-4

ebook111-4 Flash 4 Flash 4 F l a s h 5 Flash 4 Flash Flash 4 Flash 4 Flash 4 4.1 Flash 4 Flash 4 Flash 4 Flash Flash 4 Flash 4 4.2 Flash 4 Flash 4 A Flash 4 S h i f t F i l e P r e f e r e n c e s > > Flash 4 Flash

More information

App Flappy Bird 14 STEP Swift GameKit Xcode 5.1 Swift GameKit MyWord

App Flappy Bird 14 STEP Swift GameKit Xcode 5.1 Swift GameKit MyWord STEP 1 5.1 Swift GameKit Xcode 5.1 Swift GameKit MyWord -2-3 Swift APP STEP 2 Xcode new grouppic -3 Xcode STEP 3-4 ch\-1\1\myfly\gamescene.swift 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 17 18 19 20

More information

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6 www.brainysoft.net 1.JasperReport ireport...4 1.1 JasperReport...4 1.2 ireport...4 2....4 2.1 JDK...4 2.1.1 JDK...4 2.1.2 JDK...5 2.1.3 JDK...5 2.2 ant...6 2.2.1 ant...6 2.2.2 ant...6 2.3 JasperReport...7

More information

附录J:Eclipse教程

附录J:Eclipse教程 附 录 J:Eclipse 教 程 By Y.Daniel Liang 该 帮 助 文 档 包 括 以 下 内 容 : Eclipse 入 门 选 择 透 视 图 创 建 项 目 创 建 Java 程 序 编 译 和 运 行 Java 程 序 从 命 令 行 运 行 Java Application 在 Eclipse 中 调 试 提 示 : 在 学 习 完 第 一 章 后 使 用 本 教 程 第

More information

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco Windows RTEMS 1 Danilliu MMI TCP/IP 80486 QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos ecos Email www.rtems.com RTEMS ecos RTEMS RTEMS Windows

More information

Microsoft Word - Java全文.doc

Microsoft Word - Java全文.doc 第 4 章事件模型与事件处理 本章导读 本章首先介绍事件处理的由来, 并描述基于窗口的事件驱动程序的流程, 接着详细阐述 AWT 事件处理模型, 主要涉及三类对象 : 事件源 监听器和事件处理方法, 并说明事件处理机制, 具体介绍事件类 事件监听器 AWT 事件及其相应的监听器接口 事件适配器和常用的四种对事件的响应, 最后介绍开发一个基于 Java 平台事件驱动模型的记事本的案例 本章要点 事件处理的流程和机制

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

(京)新登字063号

(京)新登字063号 教 育 部 职 业 教 育 与 成 人 教 育 司 推 荐 教 材 Java 程 序 设 计 教 程 ( 第 二 版 ) 沈 大 林 主 编 沈 昕 肖 柠 朴 曾 昊 等 编 著 内 容 简 介 Java 是 由 美 国 SUN 公 司 开 发 的 一 种 功 能 强 大 的, 具 有 简 单 面 向 对 象 分 布 式 可 移 植 等 性 能 的 多 线 程 动 态 计 算 机 编 程 语 言

More information

雲端 Cloud Computing 技術指南 運算 應用 平台與架構 10/04/15 11:55:46 INFO 10/04/15 11:55:53 INFO 10/04/15 11:55:56 INFO 10/04/15 11:56:05 INFO 10/04/15 11:56:07 INFO

雲端 Cloud Computing 技術指南 運算 應用 平台與架構 10/04/15 11:55:46 INFO 10/04/15 11:55:53 INFO 10/04/15 11:55:56 INFO 10/04/15 11:56:05 INFO 10/04/15 11:56:07 INFO CHAPTER 使用 Hadoop 打造自己的雲 8 8.3 測試 Hadoop 雲端系統 4 Nodes Hadoop Map Reduce Hadoop WordCount 4 Nodes Hadoop Map/Reduce $HADOOP_HOME /home/ hadoop/hadoop-0.20.2 wordcount echo $ mkdir wordcount $ cd wordcount

More information

OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数

OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数 OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数 复习 类的复用 组合 (composition): has-a 关系 class MyType { public int i; public double d; public char c; public void set(double

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 1Z0-854 Title : Java Standard Edition 5 Programmer Certified Professional Upgrade Exam Version : Demo 1 / 12 1.Given: 20. public class CreditCard

More information

提纲 1 2 OS Examples for 3

提纲 1 2 OS Examples for 3 第 4 章 Threads2( 线程 2) 中国科学技术大学计算机学院 October 28, 2009 提纲 1 2 OS Examples for 3 Outline 1 2 OS Examples for 3 Windows XP Threads I An Windows XP application runs as a seperate process, and each process may

More information

epub 61-2

epub 61-2 2 Web Dreamweaver UltraDev Dreamweaver 3 We b We b We Dreamweaver UltraDev We b Dreamweaver UltraDev We b We b 2.1 Web We b We b D r e a m w e a v e r J a v a S c r i p t We b We b 2.1.1 Web We b C C +

More information

内 容 简 介 本 书 是 一 本 关 于 语 言 程 序 设 计 的 教 材, 涵 盖 了 语 言 的 基 本 语 法 和 编 程 技 术, 其 中 包 含 了 作 者 对 语 言 多 年 开 发 经 验 的 总 结, 目 的 是 让 初 学 的 读 者 感 受 到 语 言 的 魅 力, 并 掌

内 容 简 介 本 书 是 一 本 关 于 语 言 程 序 设 计 的 教 材, 涵 盖 了 语 言 的 基 本 语 法 和 编 程 技 术, 其 中 包 含 了 作 者 对 语 言 多 年 开 发 经 验 的 总 结, 目 的 是 让 初 学 的 读 者 感 受 到 语 言 的 魅 力, 并 掌 语 言 程 序 设 计 郑 莉 胡 家 威 编 著 清 华 大 学 逸 夫 图 书 馆 北 京 内 容 简 介 本 书 是 一 本 关 于 语 言 程 序 设 计 的 教 材, 涵 盖 了 语 言 的 基 本 语 法 和 编 程 技 术, 其 中 包 含 了 作 者 对 语 言 多 年 开 发 经 验 的 总 结, 目 的 是 让 初 学 的 读 者 感 受 到 语 言 的 魅 力, 并 掌 握 语

More information