ๆญฏ์ 9์ฅ.PDF
|
|
- ํธ์ ๊ตญ
- 7 years ago
- Views:
Transcription
1 9 (Swing) Model-View-Controller 1
2 8 GUI(Graphic User Interface) GUI (swing) (architecture),,, look and feel AWT 2 (frame work) Kim Topley Core Java Foundation Classes (Prentice Hall 1998) - - ( Model-View-Controller Design Pattern) (Swing Component Architecture) (Tree) ( ) (content) (visual appearance) (behavior) : look and feel Metal Window Motif, look and feel look and feel (content) - - (Model-View- Controller: MVC) 3 (Model): (content) (View): (Controller): (Input) 3 (content), (active) (tag) 2
3 (view) 9-1: (abstract) : (simulate) HTML WYSIWYG(What you see is what you get) (tag) :,,, Christoper Alexander 3
4 Timeless way of Building(Oxford University Press) Alexander (catalog) look and feel, 3,, Elements of Reusable Object-Oriented Software by Erich Gamma A system of Patterns by Frank Buschmann John Wiley & sons AWT listener - - listener - - (JButton JTextField ) (wrapper) ( ), (wrapper) ( (caret) ), 4
5 ( look and feel ) - - (pluggable) look and feel look and feel look and feel (pluggable) look and feel (wrapper) - -,, - - model ButtonModel DefaultButtonModel ButtonModel Table 9-1 (accessor) 9-1 ButtonModel GetActionCommand (action) ( ) getmnemonic( ) isarmed( ) true isenabled( ) true ispressed( ) true isrollover( ) true isselecteed( ) (toggle) true - (radio button) (check box) ) JButton JButton button = new JButton( Blue ); ButtonMode modeel = buttongetmodel ( ); - JButton ( JButton ) 5
6 ButtonModel ( DefaultButtonModel),,, metal look and feel JButton ButtonUIListener BasicButtonUI UI JButton JButton DefaultButtonModel ( ), DefaultButtonUI JComponent (layout) JDK VB Delphi (form) (designer) Java-enabled look and feel 9-5: 3 1 JButton yellowbutton = new JButton( Yellow ) 2 add(yellowbutton); 3 yellowbuttonaddactionlistener(this);? : (flow) 6 ( 9-7) 9-7 (dynamic) : (default) 6
7 FlowLayout LEFT RIGHT setlayout ( new FlowLayout(FlowLayoutLEFT)) (flow) (reflow) : (version) javaawtcontainer setlayout(layoutmanager m) void add(component c) API) javaawtflowlayout FlowLayout(int align) FlowLayout : align : LEFT, CENTER, RIGHT FlowLayout(int align, int hgap, intvgap) FlowLayout : align : LEFT, CENTER, RIGHT hgap ( (overlap) ) vgap ( (overlap) ) (Border Layout) JFrame (pane) north, south, east, west center ( 9-8) 9-8 class MyPanel extends JPanel { setlayout( new BorderLayout( ) ); 7
8 add(yellowbutton, South ); center, (center) North, South, East, West Center ( ) Center ( ) BorderLayout JFrame (content pane) center Container contentpane = getcontentpane( ); contentpaneadd(yellowbutton, South ); api: javaawtcontainer void add(component c, Object constraints) : c constraints (identifier) api:javaawtborderlayout(int hgap, int vgap), BorderLayout : hgap ( (overlap) ) vgap ( (overlap) ) BorderLayout 9-9 (southern) (panel) (prototype) GridBagLayout 9-9 8
9 VB : (picture box) 9-10 (south) JPanel (instance) FlowLayout add FlowLayout 3 Container contentpane = getcontentpane ( ); JPanel panel new JPanel ( ); paneladd(yellowbutton); paneladd(bluebutton); paneladd(redbutton); contentpaneadd(panel, South ); : (organizee) JPanel FlowLayout setlayout JPanel ( ) api) javaxswingjpanel JPanel (LayoutManager m) (edit) 2 text fields text areas text field text area JTextField JTextArea JTextComponent JTextComponent API JTextComponent API field area 9
10 JTextComponent api: javaxswingjtextcomponent void settext(string t) t String gettext( ) void seteditable (boolean b) JTextComponent (text field) JPanel panel = new JPanel(); JTextField textfield = new JTextField( Default input, 20); paneladd(textfield); Default input 20, (column) n n 1 2 AWT JTextField (run time) setcolumn : setcolumns validate textfieldsetcolumns(10); validate( ); validate validate , JTextField 10
11 JTextField textfield = new JTextField(, 20); TextComponent settext, hourfieldsettext( 12 ); gettext gettext trim String hour = hourfieldgettext()trim();, javaawtcomponent setfont (update) 9-11 ( ) : (the model) (view) (architecture) (formated), ( HTML) Document document listener document textfieldlgetdocument ( )adddocumentlistener (listener) ; void insertupdate(documentevent e) void removeupdate(documentevent e) void changedupdate(documentevent e) (callback) - (adapter) listener 3 class TextTestFrame extends JFrame implements DocumentListener { public void insertupdate(documentevent e) { setclock(); 11
12 public void removeupdate(documentevent e) { setclock(); public void changedupdate(documentevent e) { setclock gettext (integer) int hours = IntegerparseInt(hourFieldgetText()trim()); int minutes = IntegerparseInt(minuteFieldgetText()trim()); two javalangnumberformatexception DocumentEvent qusghkeehls 8 ActionEvent DocumentEvent DocumentEvent EventObejct getsource public void insertupdate(documentevent e) { Document d = egetdocument ( );? (editablee) HTML (structure) (reference) (reference) Document d = egetdocument( ); int length = dgetlength( ); String text = null; try { text = dgettext(0, length); catch(badlocationexception ex) { 9-1 (listener)
13 : (listener) ENTER ENTER (focus) :TextTestjava import javaawt*; import javaawtevent*; import javaxswing*; import javaxswingevent*; class TextTestFrame extends JFrame implements DocumentListener { public TextTestFrame() { settitle("texttest"); setsize(300, 200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); Container contentpane = getcontentpane(); JPanel p = new JPanel(); hourfield = new JTextField("12", 3); padd(hourfield); hourfieldgetdocument()adddocumentlistener(this); minutefield = new JTextField("00", 3); padd(minutefield); minutefieldgetdocument()adddocumentlistener(this); contentpaneadd(p, "South"); clock = new ClockPanel(); contentpaneadd(clock, "Center"); public void insertupdate(documentevent e) { setclock(); public void removeupdate(documentevent e) { setclock(); public void changedupdate(documentevent e) { public void setclock() { int hours = IntegerparseInt(hourFieldgetText()trim()); 13
14 int minutes = IntegerparseInt(minuteFieldgetText()trim()); clocksettime(hours, minutes); private JTextField hourfield; private JTextField minutefield; private ClockPanel clock; class ClockPanel extends JPanel { public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawoval(0, 0, 100, 100); double hourangle = 2 * MathPI * (minutes - 3 * 60) / (12 * 60); double minuteangle = 2 * MathPI * (minutes - 15) / 60; gdrawline(50, 50, 50 + (int)(30 * Mathcos(hourAngle)), 50 + (int)(30 * Mathsin(hourAngle))); gdrawline(50, 50, 50 + (int)(45 * Mathcos(minuteAngle)), 50 + (int)(45 * Mathsin(minuteAngle))); public void settime(int h, int m) { minutes = h * 60 + m; repaint(); private int minutes = 0; public class TextTest { public static void main(string[] args) { JFrame frame = new TextTestFrame(); frameshow(); API: javaawtcomponent void validate ( ) API:javaawtJTextField JTextField(cols) JTextfield : cols JTextField(String text, int cols) JTextfield 14
15 : text cols void setcolumns( int cols) : cols API) javaxswingtextdocument int getlength( ) String gettext(int offset, int length) : offset length void adddocumentlistener(documentlistener listener) API:javaxswingeventDocumentEvent Document getdocument( ) API) javaxswingeventdocumentlistener void changedupdate(documentevent e) (set) void insertupdate(documentevent e) void changedupdate(documentevent e) (validation), 0-9 JTextField IntTextField (validating) (key) (listener) 15
16 (consume) ( (consuming) 8 ) (valid) look and feel (cut), (copy), (paste) metal look and feel CTRL+V - - (caret) DocumentinsertString ( ) TextField PlainDocument Document IntTextDocument PlainDocument insertstring insertstring ( ) IntTextDocument insertstring IntegerparseInt superinsertstring PlainDocumentinsertString IntegerparseInt IntTextDocument insertstring ( 11 ) class IntTextDocument extends PlainDocument { public void insertstring(int offs, String str, AttributeSet a) throws BadLocationException { if (str == null) return; String oldstring = gettext(0, getlength()); String newstring = oldstringsubstring(0, offs) + str + oldstringsubstring(offs); try { IntegerparseInt(newString + "0"); superinsertstring(offs, str, a); catch(numberformatexception e) { JTextField IntTextField 16
17 createdefaultmodel IntTextDocument PlainDocument class IntTextField extends JTextField { public IntTextField(int defval, int size) { super("" + defval, size); protected Document createdefaultmodel() { return new IntTextDocument(); (entry) 3 insertstring( ) 0 IntTextField isvalid insertstring isvalid IntTextField getvalue getvalue isvalid VB : KeyAscii 0 VB java IntTextField : Toolkit (beep) ToolkitgetdefaultToolkit( )beep( ); ValidationTextjava import javaawt*; import javaawtevent*; import javaxswing*; import javaxswingevent*; import javaxswingtext*; class ValidationTestFrame extends JFrame implements DocumentListener { public ValidationTestFrame() 17
18 { settitle("validationtest"); setsize(300, 200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); Container contentpane = getcontentpane(); JPanel p = new JPanel(); hourfield = new IntTextField(12, 3); padd(hourfield); hourfieldgetdocument()adddocumentlistener(this); minutefield = new IntTextField(0, 3); padd(minutefield); minutefieldgetdocument()adddocumentlistener(this); contentpaneadd(p, "South"); clock = new ClockPanel(); contentpaneadd(clock, "Center"); public void insertupdate(documentevent e) { setclock(); public void removeupdate(documentevent e) { setclock(); public void changedupdate(documentevent e) { public void setclock() { if (hourfieldisvalid() && minutefieldisvalid()) { int hours = hourfieldgetvalue(); int minutes = minutefieldgetvalue(); clocksettime(hours, minutes); private IntTextField hourfield; private IntTextField minutefield; private ClockPanel clock; class ClockPanel extends JPanel { public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawoval(0, 0, 100, 100); double hourangle = 2 * MathPI * (minutes - 3 * 60) / (12 * 60); double minuteangle 18
19 = 2 * MathPI * (minutes - 15) / 60; gdrawline(50, 50, 50 + (int)(30 * Mathcos(hourAngle)), 50 + (int)(30 * Mathsin(hourAngle))); gdrawline(50, 50, 50 + (int)(45 * Mathcos(minuteAngle)), 50 + (int)(45 * Mathsin(minuteAngle))); public void settime(int h, int m) { minutes = h * 60 + m; repaint(); public void tick() { minutes++; repaint(); private int minutes = 0; public class ValidationTest { public static void main(string[] args) { JFrame frame = new ValidationTestFrame(); frameshow(); class IntTextDocument extends PlainDocument { public void insertstring(int offs, String str, AttributeSet a) throws BadLocationException { if (str == null) return; String oldstring = gettext(0, getlength()); String newstring = oldstringsubstring(0, offs) + str + oldstringsubstring(offs); try { IntegerparseInt(newString + "0"); superinsertstring(offs, str, a); catch(numberformatexception e) { class IntTextField extends JTextField { public IntTextField(int defval, int size) { super("" + defval, size); protected Document createdefaultmodel() { return new IntTextDocument(); 19
20 public boolean isvalid() { try { IntegerparseInt(getText()); return true; catch(numberformatexception e) { return false; public int getvalue() { try { return IntegerparseInt(getText()); catch(numberformatexception e) { return 0; API) javaxswingtextjtextcomponent int getcaretposition ( ) ( ) void SetCaretPosition(int pos) ( ) API) javaxswingtextdocument void insertstring(int offset, String str) null : offset (offset) str void remove(int offset, String len) : offset (offset) len API) javaxswingjtextfield Document createdefaultmodel ( ) (PlainDocument ) (Password fields) 20
21 (*) JPasswordField - - API) javaswingjpasswordfield JPasswordField(String text, int columns) : text null columns void setechochar(char echo) look and feel 0 : echo char[] getpassword (overwrite) ( (garbage) ) (Text Area) JTextArea, ENTER \n 12 StringTokenizer 9-12 JTextArea textarea = new JTextArea(8, 40) // 8 40 getcontentpane( )add(textarea); 1 2 setcolumns setrows (line-wrapping) textareasetlinewrap(true); // 21
22 9-12: (wrapping) \n (scroll pane) textareea = new JTextArea(8, 40); JScrollPane scrollpane = new JScrollPane(textArea); getcontentpane( )add(scrollpane, Center ); Insert - (line-wrapping) wrap no wrap (section) (highlight) (cut), (copy), (paste) CTRL+X, CTRL+C CTRL+V ( look and feel Metal, Windows, Mac look and feel ) : JTextArea (HTML RTF ) JEditorPane JTextPane :TextAreaTextjava import javaawt*; import javaawtevent*; import javaxswing*; class TextAreaFrame extends JFrame implements ActionListener { public TextAreaFrame() { JPanel p = new JPanel(); insertbutton = new JButton("Insert"); padd(insertbutton); insertbuttonaddactionlistener(this); wrapbutton = new JButton("Wrap"); padd(wrapbutton); wrapbuttonaddactionlistener(this); nowrapbutton = new JButton("No wrap"); padd(nowrapbutton); 22
23 nowrapbuttonaddactionlistener(this); getcontentpane()add(p, "South"); textarea = new JTextArea(8, 40); scrollpane = new JScrollPane(textArea); getcontentpane()add(scrollpane, "Center"); settitle("textareatest"); setsize(300, 300); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); public void actionperformed(actionevent evt) { Object source = evtgetsource(); if (source == insertbutton) textareaappend ("The quick brown fox jumps over the lazy dog "); else if (source == wrapbutton) { textareasetlinewrap(true); scrollpanevalidate(); else if (source == nowrapbutton) { textareasetlinewrap(false); scrollpanevalidate(); private JButton insertbutton; private JButton wrapbutton; private JButton nowrapbutton; private JTextArea textarea; private JScrollPane scrollpane; public class TextAreaTest { public static void main(string[] args) { JFrame f = new TextAreaFrame(); fshow(); API) javaswingjtextarea JTextArea(int rows, int cols) : rows cols 23
24 JTextArea(String text, int rows, int cols) : text rows cols void setcolumns(int cols) : cols void setrows(int rows) : cols void append(string newtext) : newtext void setlinewrap(boolean wrap) - (line-wrapping) wrap (wrap) true void setwrapstyleword(boolean word) word true word (boundary) (wrap) false word API) javaxswingjscrollpane JScrollPane(Component c) : c ( (boundary) ) (identify) (identifier) JLabel JLabel SwingConstants LEFT, 24
25 RIGHT, CENTER, NORTH, EAST JLabel JLabel label = new JLabel ( Text, SwingConstantsLEFT); JLabel label = new JLabel( Text, JLabelLEFT) settext seticon 9-13 with API) javaxswingjlabel JLabel(String text) : text JLabel(Icon icon) icon JLabel(String text, int align) : text align SwingConstantsLEFT, SwingConstantsRIGHT, SwingConstantsCENTER JLabel(String text, Icon icon, int align) : text icon align SwingConstantsLEFT, SwingConstantsRIGHT, SwingConstantsCENTER void settext(string text) : text void seticon(string text) : text ( ) 25
26 , selectall(),, select select substring 1, tselect(10, 15) (End-of-line) getselectionstart getselectionend getselectedtext Windows SHIFT + arrow API) javaawttextjtextcomponent void selectall() void select(int selstart, int selend) : selstart selend + 1 int getselectionstart() int getselectionend() + 1 String getselectedtext() JTextArea, 9-4 find-and-replace 7-6 Replace, URL 9-4: TextEditTestjava 26
27 import javaawt*; import javaawtevent*; import javaxswing*; class TextEditFrame extends JFrame { public TextEditFrame() { settitle("textedittest"); setsize(300, 300); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); Container contentpane = getcontentpane(); JPanel panel = new JPanel(); JButton replacebutton = new JButton("Replace"); paneladd(replacebutton); replacebuttonaddactionlistener(new ActionListener() { public void actionperformed(actionevent evt) { String f = fromgettext(); int n = textareagettext()indexof(f); if (n >= 0 && flength() > 0) textareareplacerange(togettext(), n, n + flength()); ); from = new JTextField(8); paneladd(from); paneladd(new JLabel("with")); to = new JTextField(8); paneladd(to); textarea = new JTextArea(8, 40); scrollpane = new JScrollPane(textArea); contentpaneadd(panel, "South"); contentpaneadd(scrollpane, "Center"); private JScrollPane scrollpane; private JTextArea textarea; private JTextField from, to; public class TextEditTest { public static void main(string[] args) { JFrame f = new TextEditFrame(); fshow(); 27
28 API) javaawtjtextarea void inserttext(string str, int pos) : str pos (0=, \n ) void replacerange(string str, int start, int end) : str start end + 1,, (Check Box) yes no, 9-14 : italic (helper) public CheckBoxFrame() { JPanel p = new JPanel(); bold = addcheckbox(p, "Bold"); italic = addcheckbox(p, "Italic"); add(p, "South"); public JCheckBox addcheckbox(jpanel p, String name) { JCheckBox c = new JCheckBox(name); caddactionlistener(this); padd(c); return c; 28
29 9-14 setselected boldsetselected(true); actionperformed isselected false true public void actionperformed(actionevent evt) { int m = (boldisselected()? FontBOLD : 0) + (italicisselected()? FontITALIC : 0); panelsetfont(m); : AWT JCheckBox Checkbox Example 9-5 CheckBoxTestjava import javaawt*; import javaawtevent*; import javaxswing*; class CheckBoxFrame extends JFrame implements ActionListener { public CheckBoxFrame() { settitle("checkboxtest"); setsize(300, 200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); JPanel p = new JPanel(); bold = addcheckbox(p, "Bold"); italic = addcheckbox(p, "Italic"); getcontentpane()add(p, "South"); panel = new CheckBoxTestPanel(); getcontentpane()add(panel, "Center"); public JCheckBox addcheckbox(jpanel p, String name) { JCheckBox c = new JCheckBox(name); 29
30 caddactionlistener(this); padd(c); return c; public void actionperformed(actionevent evt) { int m = (boldisselected()? FontBOLD : 0) + (italicisselected()? FontITALIC : 0); panelsetfont(m); private CheckBoxTestPanel panel; private JCheckBox bold; private JCheckBox italic; class CheckBoxTestPanel extends JPanel { public CheckBoxTestPanel() { setfont(fontplain); public void setfont(int m) { setfont(new Font("SansSerif", m, 12)); repaint(); public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawstring ("The quick brown fox jumps over the lazy dog", 0, 50); public class CheckBoxTest { public static void main(string[] args) { JFrame frame = new CheckBoxFrame(); frameshow(); API) javaawtjcheckbox JCheckbox(String label) : label JCheckbox(String label, boolean state) : label state JCheckbox(String label, boolean state) 30
31 : label icon boolean isselected() void setselected(boolean state),, (radio button group) 9-15 Small, Medium, Large, Extra-large ButtonGroup JRadioButton small = new JRadioButton( Small, false) medium = new JRadioButton( Medium, true) ButtonGroup group = new ButtonGroup ( ); groupadd(small); groupadd(medium); 9-15 true false JPanel public void actionperformed(actionevent evt) { Object source = evtgetsource(); if(source == smallbutton) panelsetsize(8); else if (source == mediumbutton) panelsetsize(12); 31
32 isselected ButtonGroup ButtonGroup getselection ButtonModel (view) ButtonModel ButtonModel getselectedobjects ItemSelectable null ButtonModel getactioncommand setactioncommand buttongroupgetselectiongetactioncommand( ) 9-7 BorderText :RadioButtonTestjava import javaawt*; import javaawtevent*; import javaxswing*; class RadioButtonFrame extends JFrame implements ActionListener { public RadioButtonFrame() { settitle("radiobuttontest"); setsize(400, 200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); JPanel buttonpanel = new JPanel(); ButtonGroup group = new ButtonGroup(); smallbutton = addradiobutton(buttonpanel, group, "Small", false); mediumbutton = addradiobutton(buttonpanel, group, "Medium", true); largebutton = addradiobutton(buttonpanel, group, "Large", false); xlargebutton = addradiobutton(buttonpanel, group, "Extra large", false); 32
33 getcontentpane()add(buttonpanel, "South"); panel = new RadioButtonTestPanel(); getcontentpane()add(panel, "Center"); public JRadioButton addradiobutton(jpanel buttonpanel, ButtonGroup g, String buttonname, boolean v) { JRadioButton button = new JRadioButton(buttonName, v); buttonaddactionlistener(this); gadd(button); buttonpaneladd(button); return button; public void actionperformed(actionevent evt) { Object source = evtgetsource(); if(source == smallbutton) panelsetsize(8); else if (source == mediumbutton) panelsetsize(12); else if (source == largebutton) panelsetsize(14); else if (source == xlargebutton) panelsetsize(18); private RadioButtonTestPanel panel; private JRadioButton smallbutton; private JRadioButton mediumbutton; private JRadioButton largebutton; private JRadioButton xlargebutton; class RadioButtonTestPanel extends JPanel { public RadioButtonTestPanel() { setsize(12); public void setsize(int p) { setfont(new Font("SansSerif", FontPLAIN, p)); repaint(); public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawstring ("The quick brown fox jumps over the lazy dog", 0, 50); public class RadioButtonTest { public static void main(string[] args) { JFrame frame = new RadioButtonFrame(); 33
34 frameshow(); API) javaxswingjradiobutton JRadioButton(String label, boolean state) : label state JRadioButton(String label, Icon icon) : label state API) javaxswingbuttongroup void add(abstractbutton b) ButtonModel getselection( ) API) javaxswingbuttonmodel String getactioncommand API) javaxswingabstractbutton void setactioncommand(string s) (Border) JComponent 1 BorderFactory Lowered bevel Raised bevel Etched Line Matte Empty ( ) 2 34
35 BorderFactorycreateTiledBorder 3 BorderFactorycreateCompoundBorder 4JComponent setborder etched Border etched = BorderFactorycreateEchedBorder ( ); Border titled = BorderFactorycreateTitledBorder (etched, A Title ); panelsetborder(titled); 9-7 (option) API n beveled border SoftBevelBorder BorderFactory :BorderTextjava import javaawt*; import javaawtevent*; import javaxswing*; import javaxswingborder*; class BorderFrame extends JFrame implements ActionListener { public BorderFrame() { JPanel buttonpanel = new JPanel(); group = new ButtonGroup(); addradiobutton(buttonpanel, group, "Lowered bevel", true); addradiobutton(buttonpanel, group, "Raised bevel", false); addradiobutton(buttonpanel, group, "Etched", false); addradiobutton(buttonpanel, group, "Line", false); addradiobutton(buttonpanel, group, "Matte", false); addradiobutton(buttonpanel, group, "Empty", false); Border etched = BorderFactorycreateEtchedBorder(); Border titled = BorderFactorycreateTitledBorder (etched, "Border types"); buttonpanelsetborder(titled); getcontentpane()add(buttonpanel, "South"); setdemopanel(); settitle("bordertest"); setsize(600, 200); 35
36 addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); public void addradiobutton(jpanel buttonpanel, ButtonGroup g, String buttonname, boolean v) { JRadioButton button = new JRadioButton(buttonName, v); buttonaddactionlistener(this); gadd(button); buttonpaneladd(button); buttonsetactioncommand(buttonname); public void actionperformed(actionevent evt) { setdemopanel(); public void setdemopanel() { JPanel panel = new JPanel(); Border border = null; String command = groupgetselection() getactioncommand(); if (commandequals("lowered bevel")) border = BorderFactorycreateLoweredBevelBorder(); else if (commandequals("raised bevel")) border = BorderFactorycreateRaisedBevelBorder(); else if (commandequals("etched")) border = BorderFactorycreateEtchedBorder(); else if (commandequals("line")) border = BorderFactorycreateLineBorder(Colorblue); else if (commandequals("matte")) border = BorderFactorycreateMatteBorder(10, 10, 10, 10, Colorblue); else if (commandequals("empty")) border = BorderFactorycreateEmptyBorder(); panelsetborder(border); getcontentpane()add(panel, "Center"); validate(); private JPanel panel; private ButtonGroup group; public class BorderTest { public static void main(string[] args) { JFrame frame = new BorderFrame(); frameshow(); 36
37 API) javaswingborderfactory static Border createlineborder(color color) static Border createlineborder(color color, int thickness) static MatteBorder creatematteborder(int top, int left, int bottom, int right, Color color) static MatteBorder creatematteborder(int top, int left, int bottom, int right, Icon tileicon) border static Border createemptyborder ( ) static Border createemptyborder (int top, int left, int bottom, int right) static Border createetchedborder ( ) static Border createetchedborder (Color highlight, Color shadow) 3 highlight, shadow 3 static Border createbevelborder ( ) static Border createbevelborder (int type, Color highlight, Color shadow) static Border createlowerdbevelborder ( ) static Border createraisedbevelborder ( ) : type BevelBorderLOWERED, BevelBorderRAISED highlight, shadow 3 static TiltedBorder CreateTitledBordeer (String title) static TiltedBorder CreateTitledBordeer (Border border) static TiltedBorder CreateTitledBordeer (Border border, String title) static TiltedBorder CreateTitledBordeer (Border border, String title, int justification, int position) static TiltedBorder CreateTitledBordeer (Border border, String title, int justification, int position, Font font) static TiltedBorder CreateTitledBordeer (Border border, int justification, int position, Font font, Color) : title border justification TitleBorderLEFT, TitleBorderRIGHT, TitleBorderCENTER position ABOVE_TOP, TOP, BELOW_TOP, ABOVE_BOTTOM, BOTTOM, BELOW_BOTTOM font color 37
38 static CompoundBorder createcompoundborder(border outsideborder, Border insideborder) API) javaxswingbordersoftbevelborder SoftBevelBorder(int type) SoftBevelBorder(int type, Color highlight, Color shadow) bevel : type BevelBorderLOWERED, BevelBorderRAISED color, shadow 3D API) javaxswingjcomponent void setborder(border border), (machinery) JList JList 9-17, quick, quickly, brown, hungry, wild, static, final, private JList String[] words = { quickly, brown, hungry, wild, ; JList wordlist = new JList(words); 9-17 (anonymous) JList wordlist = new JList (new String[ ]{ quickly, brown, hungry, wild, ); 38
39 JScrollPane scrollpane = new JScrollPane(wordList); 8 setvisiblerowcount wordlistsetvisiblerowcount(10); // 10 CTRL SHIFT setselectionmode wordlistsetselectionmode (ListSelectionModelSINGLE_SELECTION); // wordlistsetselectionmode (ListSelectionModelSINGLE_INTERVAL_SELECTION); // public void valuechanged(listselectionevent evt) (listener) class ListFrame extends JFrame implements ListSelectionListener { public ListFrame() { JList wordlist = new JList(words); wordlistaddlistselectionlistener(this); public void valuechanged(listselectionevent evt) { 2 (transitional) 39
40 evtisadjusting( ) isadjusting final true isadjusting false (transitional) isadjusting false (feedback) ; (CTRL+ ) isadjusting true isadjusting getselectedvalues VB : getselectedvalues VB List property (cast) JList source = (JList)evtgetSource(); Object[] values = sourcegetselectedvalues(); for (int i = 0; i < valueslength; i++); (String)values[I] : Object [] getselectedvalues String[ ] int length = valueslength; String[ ] words = new String(length); SystemarrayCopy(values, 0, words, 0, length); getselectedvalue ( ) String selection = (String)sourcegetSelectedValue ( ); : 40
41 public void mouseclicked(mouseevent evt) { if (evtgetclickcount ( ) == 2) { JList source = (JList)evtgetSource(); Object[ ] selection = sourcegetselectedvalues( ); doaction(selection); 9-8 valuechanged 9-8:ListTestjava import javaawt*; import javaawtevent*; import javaxswing*; import javaxswingevent*; class ListFrame extends JFrame implements ListSelectionListener { public ListFrame() { settitle("listtest"); setsize(400,300); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); String[] words = { "quick","brown","hungry","wild","silent", "huge","private","abstract","static","final" ; JList wordlist = new JList(words); JScrollPane scrollpane = new JScrollPane(wordList); JPanel p = new JPanel(); padd(scrollpane); wordlistaddlistselectionlistener(this); getcontentpane()add(p, "South"); panel = new ListTestPanel(); getcontentpane()add(panel, "Center"); public void valuechanged(listselectionevent evt) { JList source = (JList)evtgetSource(); Object[] values = sourcegetselectedvalues(); String text = ""; for (int i = 0; i < valueslength; i++) { String word = (String)values[i]; 41
42 text += word + " "; panelsetattribute(text); private ListTestPanel panel; class ListTestPanel extends JPanel { public ListTestPanel() { setattribute(""); public void setattribute(string w) { text = "The " + w + "fox jumps over the lazy dog"; repaint(); public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawstring(text, 0, 50); private String text; public class ListTest { public static void main(string[] args) { JFrame frame = new ListFrame(); frameshow(); API) javaxswingjlist JList(Object[] items) void setvisiblerowcount(int c) void setvisiblerowcount (int c) : mode SINGLE_SELECTION, SINGLE_INTERVAL_SELECTION, MULTIPLE_INTERVAL_SELECTION void addlistselectionlistener(listselectionlistener listener) Object [] getselectedvalue( ) Object getselectedvalue( ) null 42
43 API) javaxswingeventlistselectionlistener void valuechanged(listselectionevent e) (list model) (collection) JList? JList - - ( ) ( ) JList ListModel public interface ListModel { public int getsize(); public Object getelementat(int n); pubic void addlistdatalistener(listdatalistener 1); pubic void removelistdatalistener(listdatalistener 1); JList JList list data listener? JList (vector)? getelementat : 43
44 26*26*26= AbstractListModel getsize getelementat class WordListModel extends AbstractListModel { public WordListModel(int n) { length = n; public int getsize() { return (int)mathpow(26, length); public Object getelementat(int n) { n (technical) 9-8 JList wordlist = new JList(new WordListModel(3)); wordlistsetselectionmode(listselectionmodelsingle_selection); JScrollPane scrollpane = new JScrollPane(wordList); wordlistsetfixedcellwidth(50); wordlistsetfixedcellheight(15); 9-9 (entity) 9-9: LonglistTestjava import javaawt*; import javaawtevent*; import javaxswing*; import javaxswingevent*; class WordListModel extends AbstractListModel { public WordListModel(int n) { length = n; public int getsize() 44
45 { return (int)mathpow(last - FIRST + 1, length); public Object getelementat(int n) { String r = ""; for (int i = 0; i < length; i++) { char c = (char)(first + n % (LAST - FIRST + 1)); r = c + r; n = n / (LAST - FIRST + 1); return r; private int length; public static final char FIRST = 'a'; public static final char LAST = 'z'; class LongListFrame extends JFrame implements ListSelectionListener { public LongListFrame() { settitle("longlisttest"); setsize(400, 300); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); JList wordlist = new JList(new WordListModel(3)); wordlistsetselectionmode (ListSelectionModelSINGLE_SELECTION); wordlistsetfixedcellwidth(50); wordlistsetfixedcellheight(15); JScrollPane scrollpane = new JScrollPane(wordList); JPanel p = new JPanel(); padd(scrollpane); wordlistaddlistselectionlistener(this); getcontentpane()add(p, "South"); panel = new LongListPanel(); getcontentpane()add(panel, "Center"); public void valuechanged(listselectionevent evt) { JList source = (JList)evtgetSource(); String word = (String)sourcegetSelectedValue(); panelsetjumper(word); private LongListPanel panel; 45
46 class LongListPanel extends JPanel { public LongListPanel() { setjumper("fox"); public void setjumper(string w) { text = "The quick brown " + w + " jumps over the lazy dog"; repaint(); public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawstring(text, 0, 50); private String text; public class LongListTest { public static void main(string[] args) { JFrame frame = new LongListFrame(); frameshow(); API) javaxswingjlist JList(ListModdel, datamodel) void setfixedcellwidth(int width) 0 1 void setfixedcellheight(int height) 0 1 API) int getsize( ) Object getelementat(int index) model ListModel model = listgetmodel ( ); ListModel 46
47 JList Vector values = new Vector ( ); valuesaddelement( quick ); valuesaddelement( brown ); JList list = new JList(values); (vector) DefaultListModel DefalutListModel model = new DefaultListModel ( ); modeladdelement( quick ); modeladdelement( brown ); JList list = new JList(values); model modelremoveelement( quick ); modeladdelement( slow ); DefaultModel Vector ( add remove DefaultListModel ) AbstractListModel : JList DefaultListModel Vector JLIst public JList(final Vector listdata) { this (new AbstractListModel() { public int getsize( ) { return listdatasize(); public Object getelementat(int i) { return listdataelementat(i); ); ( final (vector) listdata listdata ) 47
48 API) javaxswingjlist listmodel getmodel ( ) API) javaxswingdefaultlistmodel void addelement(object obj) boolean removeelement (Object obj) (occurence) true false -Icon - (drawing) JList (list cell renderer) JList interface ListCellRenderer { Component getlistcellrenderercomponent(jlist list, Object value, int index, boolean isselected, boolean cellhasfocus); Component getpreferredsize 2 class MyCellRenderer implements ListCellRenderer { public Component getlistcellrenderercomponent (final JList list, final Object value,final int index, final boolean isselected, final boolean cellhasfocus) { return new JPanel() { public void paintcomponent(graphics g) {// public Dimension getpreferredsize() {// ; 48
49 9-10 paintcomponent JList look and feel JList getforeground /getbackground getselectionforeground/getselectionbackground 7 getpreferredsize 9-19 class FontCellRenderer implements ListCellRenderer { public Component getlistcellrenderercomponent (final JList list, final Object value, final int index, final boolean isselected, final boolean cellhasfocus) { return new JPanel() { public void paintcomponent(graphics g) { Font font = (Font)value; String text = fontgetfamily(); FontMetrics fm = ggetfontmetrics(font); gsetcolor(isselected? listgetselectionbackground() : listgetbackground()); gfillrect(0, 0, getwidth(), getheight()); gsetcolor(isselected? listgetselectionforeground() : listgetforeground()); gsetfont(font); gdrawstring(text, 0, fmgetascent()); public Dimension getpreferredsize() { Font font = (Font)value; String text = fontgetfamily(); Graphics g = getgraphics(); FontMetrics fm = ggetfontmetrics(font); return new Dimension(fmstringWidth(text), fmgetheight()); ; setcellrenderer fontlistsetcellrenderer(new FontCellRenderer()); (custom render) JLabel 49
50 class FontCellRenderer implements ListCellRenderer { public Component getlistcellrenderercomponent (JList list, Object value, int index, boolean isselected, boolean cellhasfocus) { JLabel label new JLabel( ); Font font = (Font)value; labelsettext = (fontgetfamily()); labelsetfont(font); labelsetopaque(true); labelsetbackground(isselected? listgetselectionbackground() : listgetbackground()); labelsetforeground(isselected? listgetselectionforeground() : listgetforeground()); return label; paintcomponent getpreferredsize JLabel,, FontCellRendere JLabel getlistcellrendercomponent this class FontCellRenderer implements ListCellRenderer { public Component getlistcellrenderercomponent (JList list, Object value, int index, boolean isselected, boolean cellhasfocus); { JLabel label new JLabel( ); Font font = (Font)value; settext = (fontgetfamily()); setfont(font); setopaque(true); setbackground(isselected? listgetselectionbackground() : listgetbackground()); setforeground(isselected? listgetselectionforeground() : listgetforeground()); return this; - JLabel- 9-10:ListRenderingTestjava 50
51 import javautil*; import javaawt*; import javaawtevent*; import javaxswing*; import javaxswingevent*; class FontCellRenderer implements ListCellRenderer { public Component getlistcellrenderercomponent (final JList list, final Object value, final int index, final boolean isselected, final boolean cellhasfocus) { return new JPanel() { public void paintcomponent(graphics g) { Font font = (Font)value; String text = fontgetfamily(); FontMetrics fm = ggetfontmetrics(font); gsetcolor(isselected? listgetselectionbackground() : listgetbackground()); gfillrect(0, 0, getwidth(), getheight()); gsetcolor(isselected? listgetselectionforeground() : listgetforeground()); gsetfont(font); gdrawstring(text, 0, fmgetascent()); public Dimension getpreferredsize() { Font font = (Font)value; String text = fontgetfamily(); Graphics g = getgraphics(); FontMetrics fm = ggetfontmetrics(font); return new Dimension(fmstringWidth(text), fmgetheight()); ; class ListRenderingFrame extends JFrame implements ListSelectionListener { public ListRenderingFrame() { settitle("listrenderingtest"); setsize(400, 300); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); Vector fonts = new Vector(); fontsadd(new Font("Serif", FontPLAIN, 12)); fontsadd(new Font("SansSerif", FontPLAIN, 12)); 51
52 fontsadd(new Font("Monospaced", FontPLAIN, 12)); fontsadd(new Font("Dialog", FontPLAIN, 12)); fontsadd(new Font("DialogInput", FontPLAIN, 12)); JList fontlist = new JList(fonts); fontlistsetselectionmode (ListSelectionModelSINGLE_SELECTION); fontlistsetcellrenderer(new FontCellRenderer()); JScrollPane scrollpane = new JScrollPane(fontList); JPanel p = new JPanel(); padd(scrollpane); fontlistaddlistselectionlistener(this); getcontentpane()add(p, "South"); panel = new ListRenderingPanel(); getcontentpane()add(panel, "Center"); public void valuechanged(listselectionevent evt) { JList source = (JList)evtgetSource(); Font font = (Font)sourcegetSelectedValue(); panelsetfont(font); private ListRenderingPanel panel; class ListRenderingPanel extends JPanel { public ListRenderingPanel() { setfont(new Font("Serif", FontPLAIN, 12)); public void setfont(font f) { currentfont = f; repaint(); public void paintcomponent(graphics g) { superpaintcomponent(g); gsetfont(currentfont); gdrawstring ("The quick brown fox jumps over the lazy dog", 0, 50); private Font currentfont; public class ListRenderingTest { public static void main(string[] args) { JFrame frame = new ListRenderingFrame(); frameshow(); 52
53 API) javaxswingjlist Color getbackground ( ) Color getselectionbackground ( ) void setcellrender(listcellrender cellrenderer) API) javaxswinglistcellrenderer Component getlist (JList list, Object item, int index, boolean isselected, boolean HasFocus) paint cell getpreferedsize : list item isselected true hasfocus true 9-20 (editable) (combo box) seteditable JComboBox getselecteditem (Serif, SansSerif, Monospaced, etc ) additem additem style = new JComboBox(); styleseteditable(true); styleadditem("serif"); styleadditem("sansserif"); insertitemat 53
54 styleinsetitemat( Monospaced, 0) removeitem removeitemat styleremoveitem( Monospaced ) styleremoveitemat(0) RemoveAllItem getactioncommand getselecteditem getsource public void actionperformed(actionevent evt) { JComboBox source = (JComboBox)evtgetSource(); String item = (String)sourcegetSelectedItem(); panelsetstyle(item); 9-11 import javaawt*; import javaawtevent*; import javaxswing*; class ComboBoxFrame extends JFrame implements ActionListener { public ComboBoxFrame() { settitle("comboboxtest"); setsize(300,200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); style = new JComboBox(); styleseteditable(true); styleadditem("serif"); styleadditem("sansserif"); styleadditem("monospaced"); styleadditem("dialog"); styleadditem("dialoginput"); styleaddactionlistener(this); JPanel p = new JPanel(); padd(style); getcontentpane()add(p, "South"); panel = new ComboBoxTestPanel(); getcontentpane()add(panel, "Center"); public void actionperformed(actionevent evt) 54
55 { JComboBox source = (JComboBox)evtgetSource(); String item = (String)sourcegetSelectedItem(); panelsetstyle(item); private ComboBoxTestPanel panel; private JComboBox style; class ComboBoxTestPanel extends JPanel { public ComboBoxTestPanel() { setstyle("serif"); public void setstyle(string s) { setfont(new Font(s, FontPLAIN, 12)); repaint(); public void paintcomponent(graphics g) { superpaintcomponent(g); gdrawstring ("The quick brown fox jumps over the lazy dog", 0, 50); public class ComboBoxTest { public static void main(string[] args) { JFrame frame = new ComboBoxFrame(); frameshow(); API) javaxswingjcombobox void seteditable(boolean b) : b true, false void additem(object item) void insertitemat(object item, int index) void removeitem(object item) void removeitemat(int index) void removeallitems( ) 55
56 Object getselecteditem( ) : (AdjustableHORIZONTAL AdjustableVERTICAL) setorientation : getvalue setvalue : setminimum setmaximum (visible area): ( 9-21) 0 setvisibleamount :, 1 setlineincrement (block increment):, (block increment) 10 setlineincrement setpageincrement (AdjustableHORIZON, AdjustableVERTICAL), (visible amount) SetValues SetValues red, green, blue ( 9-22) 2 red = new JScrollBar(Adjustable, HORIZONTAL) redsetvalues(0, 0, 0, 255) red = new JScrollBar(AdjustbleHORIZONTAL, 0, 0, 0, 255) (Adjustment) 5 56
57 UNIT_INCREMENT UNIT_DECREMENT BLOCK_INCREMENT BLOCK_DECREMENT TRACK evt evtgetadjustmenttype( ) getvalue( ) public void adjustmentvaluechanged(adjustmentevent evt) { redlabelsettext("red " + redgetvalue()); greenlabelsettext("green " + greengetvalue()); bluelabelsettext("blue " + bluegetvalue()); csetbackground(new Color(redgetValue(), greengetvalue(), bluegetvalue())); crepaint(); 9-12 ( grid layout 9-12:ColorSelectjava import javaawt*; import javaawtevent*; import javaxswing*; public class ColorSelect extends JFrame implements AdjustmentListener { public ColorSelect() { settitle("colorselect"); setsize(300, 200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); Container contentpane = getcontentpane(); JPanel p = new JPanel(); psetlayout(new GridLayout(3, 2)); padd(redlabel = new JLabel("Red 0")); padd(red = new JScrollBar(AdjustableHORIZONTAL, 57
58 0, 0, 0, 255)); redsetblockincrement(16); redaddadjustmentlistener(this); padd(greenlabel = new JLabel("Green 0")); padd(green = new JScrollBar(AdjustableHORIZONTAL, 0, 0, 0, 255)); greensetblockincrement(16); greenaddadjustmentlistener(this); padd(bluelabel = new JLabel("Blue 0")); padd(blue = new JScrollBar(AdjustableHORIZONTAL, 0, 0, 0, 255)); bluesetblockincrement(16); blueaddadjustmentlistener(this); contentpaneadd(p, "South"); colorpanel = new JPanel(); colorpanelsetbackground(new Color(0, 0, 0)); contentpaneadd(colorpanel, "Center"); public void adjustmentvaluechanged(adjustmentevent evt) { redlabelsettext("red " + redgetvalue()); greenlabelsettext("green " + greengetvalue()); bluelabelsettext("blue " + bluegetvalue()); colorpanelsetbackground(new Color(redgetValue(), greengetvalue(), bluegetvalue())); colorpanelrepaint(); public static void main(string[] args) { Frame f = new ColorSelect(); fshow(); private JLabel redlabel; private JLabel greenlabel; private JLabel bluelabel; private JScrollBar red; private JScrollBar green; private JScrollBar blue; private JPanel colorpanel; API) javaxswingscrollbar JScrollbar(int orientation) : orientation HORIZONTAL VERTICAL 58
59 JScrollbar(int orientation, int value, int visible, int minimum, int maximum) : orientation HORIZONTAL VERTICAL value visible 0 minimum maximum void setvalue(int Value) value, void setvalues(int value, int visible, int minimum, int maximum) value visible 0 minimum maximum void setminimum(int value) : value void setmaximum(int value) : value void setvisibleamount(int value) : value (visible setting) void setblockincrement(int i) void setunitincrement(int i) int getvalue( ) API) javaawteventadjustmentlistener void adjustmentvaluechanged(adjustmentevent e) (Scroll Panes) 59
60 (offset) (offset) JScrollPane JScrollPane JScrollPane sp = new JScrollPane(viewdComponent); // JScrollPane sp = new JScrollPane(viewedComponent, ScrollPaneConstantsVERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstantsHORIZON_SCROLLBAR_NEVER, ); ScrollPaneConstantsHORIZON_SCROLLBAR_AS_NEEDED ScrollPaneConstantsVERTICAL_SCROLLBAR_AS_NEEDED contenpaneadd(sp, Center ) public MyComponent( ) { setpreferredsize(new Dimension(MAX_XWIDTH, MAX_YHEIGHT)); vewport JViewport vp = spgetviewport( ); vpsetviewsize(new Dimension(MAX_XWIDTH, MAX_YHEIGHT)); viewport viewport ( 60
61 9-23) * *200 MousePanel MousePanel setpreferredsize MousePanel JScrollPane 9-23 (header) ruler RulerPanel paintcomponent 9-24 setrowheaderview setcolumnheaderview ( ) RulerPanel horizrulerpanel = new RulerPanel (SwingConstantsHORIZONTAL, viewedcomponentgetpreferredsize()width, 25, 100, 100, 10); spsetcolumnheaderview(horizrulerpanel); setcorner ( SwingConstantsNORTH_WEST Swing JScrollPaneUPPER_RIGHT_CORNER ) 4 spsetcorner(jscrollpaneupper_right_corner, new label(new ImageIcon( blue-ballgif ))); PGUP/PGDN, CTRL+PGUP/CTRL+PGDN 8 JComponent registerkeyboardaction Action ScrollAction,, ( ), (-1, 61
62 +1, ) actionperformed JScrollBar setvaule class ScrollAction extends AbstractAction { public void actionperformed(actionevent evt) { JScrollBar scrollbar; if (orientation == JScrollBarHORIZONTAL) scrollbar = scrollpanegethorizontalscrollbar(); else scrollbar = scrollpanegetverticalscrollbar(); if (scrollbar == null!scrollbarisvisible()) return; int increment; if (type == UNIT) increment = scrollbargetunitincrement(); else increment = scrollbargetblockincrement(); scrollbarsetvalue(scrollbargetvalue() + increment * direction); ScrollAction spregisterkeyboardaction( new ScrollAction(p, orient, t, dir), KeyStrokegetKeyStroke(key, modifier, false), JComponentWHEN_IN_FOCUSED_WINDOW); register ScrollAction : ScrollPaneTestjava import javaawt*; import javaawtevent*; import javaxswing*; class MousePanel extends JPanel // unchanged except for setpreferredsize implements MouseMotionListener { public MousePanel() { addmouselistener(new MouseAdapter() { public void mousepressed(mouseevent evt) { int x = evtgetx(); int y = evtgety(); current = find(x, y); if (current < 0) // not inside a square add(x, y); public void mouseclicked(mouseevent evt) { int x = evtgetx(); 62
63 int y = evtgety(); if (evtgetclickcount() >= 2) { remove(current); ); addmousemotionlistener(this); setpreferredsize(new Dimension(MAX_XWIDTH, MAX_YHEIGHT)); public void paintcomponent(graphics g) { superpaintcomponent(g); for (int i = 0; i < nsquares; i++) draw(g, i); public int find(int x, int y) { for (int i = 0; i < nsquares; i++) if (squares[i]x - SQUARELENGTH / 2 <= x && x <= squares[i]x + SQUARELENGTH / 2 && squares[i]y - SQUARELENGTH / 2 <= y && y <= squares[i]y + SQUARELENGTH / 2) return i; return -1; public void draw(graphics g, int i) { gdrawrect(squares[i]x - SQUARELENGTH / 2, squares[i]y - SQUARELENGTH / 2, SQUARELENGTH, SQUARELENGTH); public void add(int x, int y) { if (nsquares < MAXNSQUARES) { squares[nsquares] = new Point(x, y); current = nsquares; nsquares++; repaint(); public void remove(int n) { if (n < 0 n >= nsquares) return; nsquares--; squares[n] = squares[nsquares]; if (current == n) current = -1; repaint(); public void mousemoved(mouseevent evt) { int x = evtgetx(); 63
64 int y = evtgety(); if (find(x, y) >= 0) setcursor(cursorgetpredefinedcursor (CursorCROSSHAIR_CURSOR)); else setcursor(cursorgetdefaultcursor()); public void mousedragged(mouseevent evt) { int x = evtgetx(); int y = evtgety(); if (current >= 0) { Graphics g = getgraphics(); gsetxormode(getbackground()); draw(g, current); squares[current]x = x; squares[current]y = y; draw(g, current); gdispose(); private static final int MAX_XWIDTH = 600; private static final int MAX_YHEIGHT = 400; private static final int SQUARELENGTH = 10; private static final int MAXNSQUARES = 100; private Point[] squares = new Point[MAXNSQUARES]; private int nsquares = 0; private int current = -1; class ScrollPaneFrame extends JFrame { public ScrollPaneFrame() { settitle("scrollpanetest"); setsize(300, 200); addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) { Systemexit(0); ); Container contentpane = getcontentpane(); Component viewedcomponent = new MousePanel(); JScrollPane sp = new JScrollPane(viewedComponent); RulerPanel horizrulerpanel = new RulerPanel (SwingConstantsHORIZONTAL, viewedcomponentgetpreferredsize()width, 25, 100, 100, 10); spsetcolumnheaderview(horizrulerpanel); RulerPanel vertrulerpanel = new RulerPanel 64
65 (SwingConstantsVERTICAL, 25, viewedcomponentgetpreferredsize()height, 100, 100, 10); spsetrowheaderview(vertrulerpanel); contentpaneadd(sp, "Center"); ScrollActionregister(sp, JScrollBarHORIZONTAL, ScrollActionUNIT, -1, KeyEventVK_LEFT, 0); ScrollActionregister(sp, JScrollBarHORIZONTAL, ScrollActionUNIT, 1, KeyEventVK_RIGHT, 0); ScrollActionregister(sp, JScrollBarVERTICAL, ScrollActionUNIT, -1, KeyEventVK_UP, 0); ScrollActionregister(sp, JScrollBarVERTICAL, ScrollActionUNIT, 1, KeyEventVK_DOWN, 0); ScrollActionregister(sp, JScrollBarHORIZONTAL, ScrollActionBLOCK, -1, KeyEventVK_PAGE_UP, InputEventCTRL_MASK); ScrollActionregister(sp, JScrollBarHORIZONTAL, ScrollActionBLOCK, 1, KeyEventVK_PAGE_DOWN, InputEventCTRL_MASK); ScrollActionregister(sp, JScrollBarVERTICAL, ScrollActionBLOCK, -1, KeyEventVK_PAGE_UP, 0); ScrollActionregister(sp, JScrollBarVERTICAL, ScrollActionBLOCK, 1, KeyEventVK_PAGE_DOWN, 0); public class ScrollPaneTest { public static void main(string[] args) { JFrame frame = new ScrollPaneFrame(); frameshow(); class ScrollAction extends AbstractAction { public ScrollAction(JScrollPane p, int orient, int t, int dir) { scrollpane = p; orientation = orient; type = t; direction = dir; public static void register(jscrollpane p, int orient, int t, int dir, int key, int modifier) { pregisterkeyboardaction( new ScrollAction(p, orient, t, dir), KeyStrokegetKeyStroke(key, modifier, false), JComponentWHEN_IN_FOCUSED_WINDOW); public void actionperformed(actionevent evt) { JScrollBar scrollbar; if (orientation == JScrollBarHORIZONTAL) 65
9แแ กแผ.key
JAVA Programming 1 GUI(Graphical User Interface) 2 GUI!,! GUI! GUI, GUI GUI! GUI AWT Swing AWT - java.awt Swing - javax.swing AWT Swing 3 AWT(Abstract Windowing Toolkit)! GUI! java.awt! AWT (Heavy weight
More information์๋ฐGUI์ค์ ํ๋ก๊ทธ๋๋ฐ2_์ฅ๋์.PDF
JAVA GUI - 2 JSTORM http://wwwjstormpekr JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: Issued by: Issue Date:
More information11แแ กแผ.key
JAVA Programming 1 GUI 2 2 1. GUI! GUI! GUI.! GUI! GUI 2. GUI!,,,!! GUI! GUI 11 : GUI 12 : GUI 3 4, JComponent 11-1 :, JComponent 5 import java.awt.*; import java.awt.event.*; import javax.swing.*; public
More information๊ฐ์์๋ฃ
Copyright, 2014 MMLab, Dept. of ECE, UOS Java Swing 2014 ๋ 3 ์ ์ต์ฑ์ข ์์ธ์๋ฆฝ๋ํ๊ต์ ์์ ๊ธฐ์ปดํจํฐ๊ณตํ๋ถ chois@uos.ac.kr http://www.mmlab.net ์ฐจ๋ก 2014๋ 3์ Java Swing 2 2017-06-02 Seong Jong Choi Java Basic Concepts-3 Graphical
More information<4D F736F F F696E74202D20C1A63233C0E520B1D7B7A1C7C820C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java ์ 23 ์ฅ๊ทธ๋ํฝํ๋ก๊ทธ๋๋ฐ ์ด๋ฒ์ฅ์์ํ์ตํ ๋ด์ฉ ์๋ฐ์์์๊ทธ๋ํฝ ๊ธฐ์ด์ฌํญ ๊ธฐ์ด๋ํ๊ทธ๋ฆฌ๊ธฐ ์์ ํฐํธ Java 2D Java 2D๋ฅผ์ด์ฉํ๊ทธ๋ฆฌ๊ธฐ Java 2D ๋ฅผ์ด์ฉํ์ฑ์ฐ๊ธฐ ๋ํํ์ ๊ณผํํ์ด๋ ์๋ฐ๋ฅผ์ด์ฉํ์ฌ์ํ๋ฉด์๊ทธ๋ฆผ์๊ทธ๋ ค๋ด ์๋ค. ์๋ฐ๊ทธ๋ํฝ๋ฐ๋ชจ ์๋ฐ๊ทธ๋ํฝ์๋๊ฐ์ง๋ฐฉ๋ฒ ์๋ฐ๊ทธ๋ํฝ AWT Java 2D AWT๋ฅผ์ฌ์ฉํ๋ฉด๊ธฐ๋ณธ์ ์ธ๋ํ๋ค์์ฝ๊ฒ๊ทธ๋ฆด์์๋ค. ์ด๋์๋์์คํ๋๋ค.
More information10แแ กแผ.key
JAVA Programming 1 2 (Event Driven Programming)! :,,,! ( )! : (batch programming)!! ( : )!!!! 3 (Mouse Event, Action Event) (Mouse Event, Action Event) (Mouse Event, Container Event) (Key Event) (Key Event,
More information<4D F736F F F696E74202D20C1A63230C0E520BDBAC0AE20C4C4C6F7B3CDC6AE203128B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java ์ 20 ์ฅ์ค์์ปดํฌ๋ํธ 1 ์ด๋ฒ์ฅ์์ํ์ตํ ๋ด์ฉ ํ ์คํธ์ปดํฌ๋ํธ ํ ์คํธํ๋ ํ ์คํธ์์ญ ์คํฌ๋กคํ์ธ ์ฒดํฌ๋ฐ์ค ๋ผ๋์ค๋ฒํผ ์ค์์์์ ๊ณตํ๋๊ธฐ์ด์ ์ธ์ปดํฌ๋ํธ๋ค์์ดํด๋ด ์๋ค. ์ค์ํ ์คํธ์ปดํฌ๋ํธ๋ค ์ข ๋ฅํ ์คํธ์ปดํฌ๋ํธ๊ทธ๋ฆผ ํ ์คํธํ๋ JTextField JPasswordField JFormattedTextField ์ผ๋ฐํ ์คํธ์์ญ JTextArea ์คํ์ผํ ์คํธ์์ญ
More informationMicrosoft PowerPoint - EEL2 Lecture10 -Swing and Event Handling.pptx
์ ์๊ณตํ์คํ 2 1 WEEK10: SWING AND EVENT HANDLING Fall, 2014 ๊ฑด๊ตญ๋์ ์๊ณตํ๋ถ Notice: ์ฃผ๋ณ๊ฐ์ / ์ค์ต /HW ๋ด์ฉ 2 Week Date ๊ฐ์์ฃผ์ Homework ์ค์ต๊ณผ์ Handouts 1 09์ 03์ผ Orientation Lab1 Lecture0 2 09์ 10์ผ ์ถ์ 3 09์ 17์ผ Using Objects
More information<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java ์ 19 ์ฅ๋ฐฐ์น๊ด๋ฆฌ์ ์ด๋ฒ์ฅ์์ํ์ตํ ๋ด์ฉ ๋ฐฐ์น๊ด๋ฆฌ์์๊ฐ์ ๋ฐฐ์น๊ด๋ฆฌ์์์ฌ์ฉ FlowLayout BorderLayout GridLayout BoxLayout CardLayout ์ ๋์์น๋ก๋ฐฐ์น ์ปจํ ์ด๋์์์์ปดํฌ๋ํธ๋ฅผ๋ฐฐ์นํ๋๋ฐฉ๋ฒ์๋ํ์ฌ์ดํด๋ด ์๋ค. ๋ฐฐ์น๊ด๋ฆฌ์ (layout manager) ์ปจํ ์ด๋์์๊ฐ์ปดํฌ๋ํธ์์์น์ํฌ๊ธฐ๋ฅผ๊ฒฐ์ ํ๋์์ [3/70] ์๋นํ๋ค๋ฅด๊ฒ๋ณด์ธ๋ค.
More informationMicrosoft PowerPoint - 04-UDP Programming.ppt
Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics ๋ชฉ์ฐจ UDP 1 1 UDP ๊ฐ๋ ์๋ฐ UDP ํ๋ก๊ทธ๋จ์์ฑ ํด๋ผ์ด์ธํธ์์๋ฒ๋ชจ๋ DatagramSocket ํด๋์ค๋ก์์ฑ ์ํธ๊ฐํต์ ์ DatagramPacket ํด๋์ค๋ฅผ์ด์ฉํ์ฌ
More informationgnu-lee-oop-kor-lec10-1-chap10
์ด์์ Java ๋์ฒ์์ด์ง! ์ 10 ์ฅ์ด๋ฒคํธ์ฒ๋ฆฌ ์ด๋ฒคํธ๋ถ๋ฅ ์ก์ ์ด๋ฒคํธ ํค์ด๋ฒคํธ ๋ง์ฐ์ค์ด๋์ด๋ฒคํธ ์ด๋ํฐํด๋์ค ์ค์์ปดํฌ๋ํธ์์ํ์ฌ์ง์๋๋์ด๋ฒคํธ๋ํฌ๊ฒ๋๊ฐ์ง์์นดํ ๊ณ ๋ฆฌ๋ก๋๋์ด์ง๋ค. ์ฌ์ฉ์๊ฐ๋ฒํผ์ํด๋ฆญํ๋๊ฒฝ์ฐ ์ฌ์ฉ์๊ฐ๋ฉ๋ดํญ๋ชฉ์์ ํํ๋๊ฒฝ์ฐ ์ฌ์ฉ์๊ฐํ ์คํธํ๋์์์ํฐํค๋ฅผ๋๋ฅด๋๊ฒฝ์ฐ ๋๊ฐ์๋ฒํผ์๋ง๋ค์ด์ํจ๋์๋ฐฐ๊ฒฝ์์๋ณ๊ฒฝํ๋ํ๋ก๊ทธ๋จ์์์ฑํ์ฌ๋ณด์. ์ด๋ฒคํธ๋ฆฌ์ค๋๋ํ๋๋ง์์ฑํ๋ค. class
More informationMicrosoft PowerPoint - รรยนร08รรฅ-1.ppt
AWT ์ปดํฌ๋ํธ (1) 1. AWT ํจํค์ง 2. AWT ํ๋ก๊ทธ๋จ๊ณผ์ด๋ฒคํธ 3. Component ํด๋์ค 4. ์ปดํฌ๋ํธ์์น ํ๊ธฐ AWT GUI ๋ฅผ๋ง๋ค๊ธฐ์ํ API ์๋์ฐํ๋ก๊ทธ๋๋ฐ์์ํํด๋์ค์๋๊ตฌ๋ฅผํฌํจ Graphical User Interface ๊ทธ๋ํฝ์์๋ฅผํตํดํ๋ก๊ทธ๋จ๊ณผ๋ํํ๋๋ฐฉ์ ๊ทธ๋ํฝ์์๋ฅผ GUI ์ปดํฌ๋ํธ๋ผํจ ์๋์ฐํ๋ก๊ทธ๋จ๋ง๋ค๊ธฐ ๊ฐ๋จํ AWT ํ๋ก๊ทธ๋จ import
More informationMicrosoft PowerPoint - รรยนร08รรฅ-2.ppt
AWT ์ปดํฌ๋ํธ (2) 1. ๋ฉ๋ด 2. ์ปจํ ์ด๋์์ปจํธ๋กค 3. ๋ฐฐ์น๊ด๋ฆฌ์ ๋ฉ๋ด๊ด๋ จํด๋์ค๊ณ์ธต๊ตฌ์กฐ Object MenuComponent MenuBar MenuItem Menu CheckboxMenuItem PopupMenu ๋ฉ๋ด ํ๋ค์ด๋ฉ๋ด ์ ๋ชฉํ์์ค๋ฐ์๋ฉ๋ด๋ฐ๋ฅผ๊ฐ์ง ๋ฉ๋ด๋ง๋ค๊ธฐ๊ณผ์ MenuBar ๊ฐ์ฒด์์ฑ MenuBar ์์ถ๊ฐํ Menu ๊ฐ์ฒด๋ฅผ์์ฑ Menu ์์ถ๊ฐํ ๋๋ค๋ฅธ์๋ธ
More informationChap12
12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)
More information11-GUI.key
10 (GUI) (Graphical User Interface) AWT/Swing Java java.awt, javax.swing (Event-Driven Programming) :,,,, (event-handler or event-listener), Java (action event), (action listner). Java AWT/Swing (component),
More informationpublic class FlowLayoutPractice extends JFrame { public FlowLayoutPractice() { super("flowlayout Practice"); this. Container contentpane = getcontentp
8 ์ฅ 1 ๋ฒ public class MyFrame extends JFrame { public MyFrame(String title) { super(title); this. setsize(400,200); new MyFrame("Let's study Java"); 2๋ฒ public class MyBorderLayoutFrame extends JFrame {
More informationiii. Design Tab ์ Click ํ์ฌ WindowBuilder ๊ฐ์๋์ผ๋ก์์ฑํ GUI ํ๋ก๊ทธ๋๋ฐํ๊ฒฝ์ํ์ธํ๋ค.
Eclipse ๊ฐ๋ฐํ๊ฒฝ์์ WindowBuilder ๋ฅผ์ด์ฉํ Java ํ๋ก๊ทธ๋จ๊ฐ๋ฐ ์ด์๋ Java ํ๋ก๊ทธ๋จ์๊ธฐ์ด๋ฅผ์ดํดํ๊ณ ์๋์ฌ๋์๋์์ผ๋ก Embedded Microcomputer ๋ฅผ์ด์ฉํ์ ์ด์์คํ ์ PC ์์ Serial ํต์ ์ผ๋ก์ ์ด (Graphical User Interface (GUI) ํ๊ฒฝ์์ ) ํ๋ํ๋ก๊ทธ๋จ๊ฐ๋ฐ์๋ฅผ์ค๋ช ํ๋ค. WindowBuilder:
More informationJava Programing Environment
Lab Exercise #7 Swing Component ํ๋ก๊ทธ๋๋ฐ 2007 ๋ดํ๊ธฐ ๊ณ ๊ธํ๋ก๊ทธ๋๋ฐ ๊น์๊ตญ์ถฉ๋จ๋์ ๊ธฐ์ ๋ณดํต์ ๊ณตํ๋ถ ์ค์ต๋ด์ฉ ์ค์ต๊ณผ์ 7-1 : ์ ๊ทํํ์์์ด์ฉํ์ฌ์ฉ์์ ๋ณด์์ ํจ์ฑ๊ฒ์ฌ (ATM ์์์ฌ์ฉ์๋ฑ๋ก์ฉ๋๋ก์ฌ์ฉ๊ฐ๋ฅ ) ์ค์ต๊ณผ์ 7-2 : ์ซ์๋ง์ถ๊ธฐ๊ฒ์ ์ค์ต๊ณผ์ 7-3 : ์ํ๊ด๋ฆฌํ๋ก๊ทธ๋จ ๊ณ ๊ธํ๋ก๊ทธ๋๋ฐ Swing Component ํ๋ก๊ทธ๋๋ฐ 2
More information05-class.key
5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)
More information์ 8์ฅ ์๋ฐ GUI ํ๋ก๊ทธ๋๋ฐ II
์ 8์ฅ MVC Model 8.1 MVC ๋ชจ๋ธ (1/7) MVC (Model, View, Controller) ๋ชจ๋ธ ์ค์์ MVC ๋ชจ๋ธ์๊ธฐ์ด๋ฅผ๋๊ณ ์๋ค. MVC๋ Xerox์์ฐ๊ตฌ์์์ Smalltalk ์ธ์ด๋ฅผ๋ฐํ์ผ๋ก์ฌ์ฉ์์ธํฐํ์ด์ค๋ฅผ๊ฐ๋ฐํ๊ธฐ์ํ๋ฐฉ๋ฒ MVC๋ 3๊ฐ์๊ตฌ์ฑ์์๋ก๊ตฌ์ฑ Model : ์์ฉํ๋ก๊ทธ๋จ์์๋ฃ๋ฅผํํํ๊ธฐ์ํ๋ชจ๋ธ View : ์๋ฃ๋ฅผ์๊ฐ์ ์ผ๋ก (GUI ๋ฐฉ์์ผ๋ก
More informationPowerPoint ํ๋ ์ ํ ์ด์
Graphical User Interface ๋ฐฐํจ์ฒ th1g@nate.com 1 ๋ชฉ์ฐจ ์๋ฐ์ GUI AWT์ Swing ํจํค์ง Swing ํด๋์ค์ํน์ง ์ปจํ ์ด๋์์ปดํฌ๋ํธ Swing GUI ๋ง๋ค๊ธฐ ์ปจํ ์ด๋์๋ฐฐ์น 2 ์๋ฐ์ GUI GUI ๋ชฉ์ ๊ทธ๋ํฝ์ด์ฉ, ์ฌ์ฉ์์๊ฒ์ดํดํ๊ธฐ์ฌ์ด๋ชจ์์ผ๋ก์ ๋ณด์ ๊ณต ์ฌ์ฉ์๋๋ง์ฐ์ค๋ํค๋ณด๋๋ฅผ์ด์ฉํ์ฌ์ฝ๊ฒ์ ๋ ฅ ์๋ฐ GUI ํน์ง ๊ฐ๋ ฅํ GUI ์ปดํฌ๋ํธ์ ๊ณต
More informationPowerPoint ํ๋ ์ ํ ์ด์
@ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program
More informationMicrosoft PowerPoint - 06-Chapter09-Event.ppt
AWT ์ด๋ฒคํธ์ฒ๋ฆฌํ๊ธฐ 1. ์ด๋ฒคํธ์ฒ๋ฆฌ๋ฐฉ์ 2. ์ด๋ฒคํธํด๋์ค์๋ฆฌ์ค๋ 3. ์ด๋ฒคํธ์ด๋ํฐ 4. ์ด๋ฒคํธ์์ข ๋ฅ ์ด๋ฒคํธ (Event) ์ด๋ฒคํธ ์ฌ์ฉ์๊ฐ UI ์ปดํฌ๋ํธ์๋ํด์ทจํ๋ํ์๋ก์ธํ์ฌ๊ฑด์ด๋ฒคํธ๊ธฐ๋ฐํ๋ก๊ทธ๋๋ฐ ๋ฌดํ๋ฃจํ๋ฅผ๋๋ฉด์์ฌ์ฉ์์ํ์๋ก์ธํ์ด๋ฒคํธ๋ฅผ์ฒญ์ทจํ์ฌ์๋ตํ๋ํํ๋ก์๋ํ๋ํ๋ก๊ทธ๋๋ฐ java.awt.event ์ด๋ฒคํธ์ฒ๋ฆฌ AWT ์ปดํฌ๋ํธ์์๋ฐ์ํ๋๋ค์ํ์ด๋ฒคํธ๋ฅผ์ฒ๋ฆฌํ๊ธฐ์ํ์ธํฐํ์ด์ค์ํด๋์ค์ ๊ณต
More information01-OOPConcepts(2).PDF
Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)
More informationMicrosoft PowerPoint ์๋ฐ-AWT์ปดํฌ๋ํธ(Ch8).pptx
5. ๋ฐฐ์น๊ด๋ฆฌ์ 1 AWT ์ปดํฌ๋ํธ 1. AWT ํ๋ก๊ทธ๋จ๊ณผ์ด๋ฒคํธ 2. Component ํด๋์ค 3. ๋ฉ๋ด 4. ์ปจํ ์ด๋์์ปจํธ๋กค AWT AWT: Abstract t Window Toolkit GUI ๋ฅผ๋ง๋ค๊ธฐ์ํ API ์๋์ฐํ๋ก๊ทธ๋๋ฐ์์ํํด๋์ค์๋๊ตฌ๋ฅผํฌํจ Graphical User Interface ๊ทธ๋ํฝ์์๋ฅผํตํดํ๋ก๊ทธ๋จ๊ณผ๋ํํ๋๋ฐฉ์ ๊ทธ๋ํฝ์์๋ฅผ GUI ์ปดํฌ๋ํธ๋ผํจ
More information๋ชจ๋ ์ค์์ปดํฌ๋ํธ์๋ํ ์คํธ์์์ด๋ฏธ์ง๋ฅผ์ถ๊ฐ๋กํ์ํ ์์๋ค. ImageIcon image = new ImageIcon("image.gif"); JLabel label = new JLabel(" ์ด๋ฏธ์ง๋ ์ด๋ธ "); label.seticon(image);
JAVA Programming Spring, 2016 Dongwoo Kang ๋ชจ๋ ์ค์์ปดํฌ๋ํธ์๋ํ ์คํธ์์์ด๋ฏธ์ง๋ฅผ์ถ๊ฐ๋กํ์ํ ์์๋ค. ImageIcon image = new ImageIcon("image.gif"); JLabel label = new JLabel(" ์ด๋ฏธ์ง๋ ์ด๋ธ "); label.seticon(image); ์ด๋ฏธ์ง๋ฒํผ์ํ์ํ๊ณ ์ฌ์ฉ์๊ฐ๋ฒํผ์๋๋ฅด๋ฉด๋ ์ด๋ธ์ํ ์คํธ๋ฅผ์ด๋ฏธ์ง๋ก๋ฐ๊พธ์ด์ํ์ํ๋ํ๋ก๊ทธ๋จ์์์ฑํด๋ณด์.
More informationMicrosoft PowerPoint - [JAVAํ๋ก๊ทธ๋๋ฐ]9์ฅGUI
๋ช ํ JAVA Programming 1 ์ 9 ์ฅ์๋ฐ GUI ๊ธฐ์ด, AWT ์์ค์ (SWING) ์๋ฐ์ GUI(Graphical User Interface) 2 GUI ๋ชฉ์ ๊ทธ๋ํฝ์ด์ฉ, ์ฌ์ฉ์์๊ฒ์ดํดํ๊ธฐ์ฌ์ด๋ชจ์์ผ๋ก์ ๋ณด์ ๊ณต ์ฌ์ฉ์๋๋ง์ฐ์ค๋ํค๋ณด๋๋ฅผ์ด์ฉํ์ฌ์ฝ๊ฒ์ ๋ ฅ ์๋ฐ GUI ํน์ง ๊ฐ๋ ฅํ GUI ์ปดํฌ๋ํธ์ ๊ณต ์ฌ์ด GUI ํ๋ก๊ทธ๋๋ฐ ์๋ฐ์ GUI ํ๋ก๊ทธ๋๋ฐ๋ฐฉ๋ฒ GUI
More informationrmi_๋ฐ์ค์ฉ_final.PDF
(RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:
More informationPowerPoint Presentation
๊ฐ์ฒด์งํฅํ๋ก๊ทธ๋๋ฐ ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ( ์ค์ต ) ์์์ด ssw5176@kangwon.ac.kr ์์ 1. ํ๋ ์์์ฑ (1) import javax.swing.*; public class FrameTest { public static void main(string[] args) { JFrame f = new JFrame("Frame Test"); JFrame
More informationPowerPoint Presentation
๊ฐ์ฒด์งํฅํ๋ก๊ทธ๋๋ฐ ๊ทธ๋ํฝํ๋ก๊ทธ๋๋ฐ ์์์ด ssw5176@kangwon.ac.kr ์๋ฐ์์์๊ทธ๋ํฝ 2 ์๋ฐ๊ทธ๋ํฝ์๋๊ฐ์ง๋ฐฉ๋ฒ 3 ๊ฐ๋จํ์์ 4 (1) ํ๋ ์์์ฑํ๊ธฐ public class BasicPaint { public static void main(string[] args) { JFrame f = new JFrame(" ๊ทธ๋ํฝ๊ธฐ์ดํ๋ก๊ทธ๋จ "); f.setdefaultcloseoperation(jframe.exit_on_close);
More information<4D F736F F F696E74202D20C1A63138C0E520C0CCBAA5C6AE20C3B3B8AE28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java ์ 18 ์ฅ์ด๋ฒคํธ์ฒ๋ฆฌ ์ด๋ฒ์ฅ์์ํ์ตํ ๋ด์ฉ ์ด๋ฒคํธ์ฒ๋ฆฌ์๊ฐ์ ์ด๋ฒคํธ ์ก์ ์ด๋ฒคํธ Key, Mouse, MouseMotion ์ด๋ํฐํด๋์ค ๋ฒํผ์๋๋ฅด๋ฉด๋ฐ์ํ๋๋ก๋ง๋ค์ด๋ด ์๋ค. ์ด๋ฒ์ฅ์๋ชฉํ ๋ฒํผ์๋๋ฅด๋ฉด๋ฒํผ์ํ ์คํธ๊ฐ๋ณ๊ฒฝ๋๊ฒํ๋ค. ์ด๋ฒคํธ์ฒ๋ฆฌ๊ณผ์ ์ด๋ฒคํธ์ฒ๋ฆฌ๊ณผ์ (1) ์ด๋ฒคํธ๋ฅผ๋ฐ์ํ๋์ปดํฌ๋ํธ๋ฅผ์์ฑํ์ฌ์ผํ๋ค. ์ด๋ฒคํธ์ฒ๋ฆฌ๊ณผ์ (2) ์ด๋ฒคํธ๋ฆฌ์ค๋ํด๋์ค๋ฅผ์์ฑํ๋ค.
More informationMicrosoft PowerPoint - java1-lecture11.ppt [ํธํ ๋ชจ๋]
์๋ฐ์์์๊ทธ๋ํฝ ๊ทธ๋ํฝ์ค, ์ด๋ฏธ์ง 514760-1 2019 ๋ ๋ดํ๊ธฐ 6/4/2019 ๋ฐ๊ฒฝ์ ์๋ฐ๊ทธ๋ํฝ์๋๊ฐ์ง๋ฐฉ๋ฒ ๊ฐ๋จํ๊ทธ๋ํฝ // (1) ํ๋ ์์์ฑํ๊ธฐ public class BasicPaint { JFrame f = new JFrame(" ๊ทธ๋ํฝ๊ธฐ์ดํ๋ก๊ทธ๋จ "); f.setdefaultcloseoperation(jframe.exit_on_close); f.setsize(300,
More informationPowerPoint Presentation
public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // ๋์๋ฅผ๋ํ๋๋ถ๋ถ์ ๋๋ค System.out.println(" ๋์์ํฉ์ " + sum +
More informationPowerPoint ํ๋ ์ ํ ์ด์
๋ช ํ JAVA Essential 1 2 ํ์ต๋ชฉํ 1. ์ด๋ฒคํธ๊ธฐ๋ฐ GUI ํ๋ก๊ทธ๋๋ฐ์ดํด 2. ์๋ฐ GUI ํจํค์ง์ดํด 3. ์ค์์ผ๋ก GUI ํ๋ก๊ทธ๋จ์์ฑ 4. ์ปจํ ์ด๋์์ปดํฌ๋ํธ, ๋ฐฐ์น 5. FlowLayout ๋ฐฐ์น๊ด๋ฆฌ์ํ์ฉ 6. BorderLayout ๋ฐฐ์น๊ด๋ฆฌ์ํ์ฉ 7. GridLayout ๋ฐฐ์น๊ด๋ฆฌ์ํ์ฉ 8. ๋ฐฐ์น๊ด๋ฆฌ์์๋์ปจํ ์ด๋๋ง๋ค๊ธฐ ์๋ฐ์ GUI(Graphical
More informationMicrosoft PowerPoint - 14์ฃผ์ฐจ ๊ฐ์์๋ฃ
Java ๋ก๋ง๋๋ Monster ์ก๊ธฐ๊ฒ์์์ ์ดํด 2014. 12. 2 ๊ฒ์ํ๋ฉด๋ฐ๊ฒ์๋ฐฉ๋ฒ ๊ธฐ์ฌ์ด๊ธฐ์์น : (0,0) ์์ดํ 10 ๊ฐ๋๋ค์์ฑ ๋ชฌ์คํฐ 10 ๋๋๋ค์์ฑ Frame ํ๋จ์๊ธฐ์ฌ์์น์๊ธฐ์ฌํ์์ถ๋ ฅ๋ฐฉํฅํค๋ก๊ธฐ์ฌ์ด๋์์ดํ ๊ณผ๋ชฌ์คํฐ๋๊ณ ์ ์ข ๋ฃ๋ฒํผํด๋ฆญํ๋ฉด์ข ๋ฃ Project ๊ตฌ์ฑ GameMain.java GUI ํ๊ฒฝ์ค์ , Main Method ๊ฒ์๊ฐ์ฒด๋จ๋ค์์น์์์ฑ Event
More information10 แแ ตแแ ฆแซแแ ณ แแ ฅแ แ ตแแ ช แแ ณแ แ ขแแ ตแจ แแ ณแ แ ฉแแ ณแ แ ขแแ ตแผ.key
[ 10 ] ..,..,,,., 2 1. 3 Section 1 p408 (event) (listen) (event listener) 4 Section 1 [ 1: ] [ 2: ] 5 Section 1 (ActionEvent) (MouseEvent) 6 Section 1 EventObject getsource() 7 Section 1 8 Section 1 MouseListener
More information02 C h a p t e r Java
02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER
More informationPowerPoint ํ๋ ์ ํ ์ด์
๊ทธ๋ํฝ ๋ฐฐํจ์ฒ th1g@nate.com 1 ๋ชฉ์ฐจ ์ค์์ปดํฌ๋ํธ๊ทธ๋ฆฌ๊ธฐ ์๋ฐ์๊ทธ๋ํฝ์ขํ์์คํ Graphics 2 ์ค์์ปดํฌ๋ํธ๊ทธ๋ฆฌ๊ธฐ ์ค์์๊ทธ๋ฆฌ๊ธฐ๊ธฐ๋ณธ์ฒ ํ ๋ชจ๋ ์ปดํฌ๋ํธ๋์์ ์๋ชจ์์์ค์ค๋ก๊ทธ๋ฆฐ๋ค. ์ปจํ ์ด๋๋์์ ์๊ทธ๋ฆฐํ์์๋ค์๊ฒ๊ทธ๋ฆฌ๊ธฐ์ง์ public void paintcomponent(graphics g) ์ค์์ปดํฌ๋ํธ๊ฐ์์ ์๋ชจ์์๊ทธ๋ฆฌ๋๋ฉ์๋ JComponent ์๋ฉ์๋ ๋ชจ๋ ์ค์์ปดํฌ๋ํธ๊ฐ์ด๋ฉ์๋๋ฅผ๊ฐ์ง๊ณ ์์
More informationMicrosoft PowerPoint - Java-03.pptx
JAVA ํ๋ก๊ทธ๋๋ฐ Chapter 19. GUI ํ๋ก๊ทธ๋๋ฐ 1 GUI ํ๊ฒฝ์์์๋ํ๋ํ๋ก๊ทธ๋จ ์๋์ฐํ๋ก๊ทธ๋จ์๋ํ์ฌ ํ ์คํธ๋ชจ๋ํ๋ก๊ทธ๋จ๊ณผ์๋์ฐํ๋ก๊ทธ๋จ a) ํ ์คํธ๋ชจ๋์ํ๋ก๊ทธ๋จ b) ์๋์ฐํ๋ก๊ทธ๋จ 2 GUI ํ๊ฒฝ์์์๋ํ๋ํ๋ก๊ทธ๋จ -2 ์๋์ฐํ๋ก๊ทธ๋จ์๋ํ์ฌ ํ ์คํธ๋ชจ๋ํ๋ก๊ทธ๋จ๊ณผ์๋์ฐํ๋ก๊ทธ๋จ์๊ตฌ์กฐ์ ์ฐจ์ด 3 ์๋์ฐํ๋ก๊ทธ๋จ์์์ฑ๋ฐฉ๋ฒ ์๋์ฐํ๋ก๊ทธ๋จ์๊ตฌ์กฐ ๋ค๋จ๊ณ๋ก์คํ๋๋์๋์ฐํ๋ก๊ทธ๋จ
More informationMicrosoft PowerPoint - java1-lecture11.ppt [ํธํ ๋ชจ๋]
Overview Swing Component 514760-1 2018 ๋ ๋ดํ๊ธฐ 5/22/2018 ๋ฐ๊ฒฝ์ JLabel, ImageIcon JTextField, JTextArea JButton, JCheckBox, JRadioButton JSlider, JComboBox JPanel, JScrollPane, JOptionPane JTable Timer JFileChooser,
More information1
1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2
More information์๋ฐ๋ก
! from Yongwoo s Park ZIP,,,,,,,??!?, 1, 1 1, 1 (Snow Ball), /,, 5,,,, 3, 3, 5, 7,,,,,,! ,, ZIP, ZIP, images/logojpg : images/imageszip :, backgroundjpg, shadowgif, fallgif, ballgif, sf1gif, sf2gif, sf3gif,
More informationch09
9 Chapter CHAPTER GOALS B I G J A V A 436 CHAPTER CONTENTS 9.1 436 Syntax 9.1 441 Syntax 9.2 442 Common Error 9.1 442 9.2 443 Syntax 9.3 445 Advanced Topic 9.1 445 9.3 446 9.4 448 Syntax 9.4 454 Advanced
More informationPowerPoint Presentation
๊ฐ์ฒด์งํฅํ๋ก๊ทธ๋๋ฐ ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ์์์ด ssw5176@kangwon.ac.kr ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค (Graphical User Interface, ๊ฐ๋จํ GUI) ๋์ปดํฌ๋ ํธ๋ค๋ก๊ตฌ์ฑ๋๋ค. 2 ์๋ฐ์์ GUI ์์ข ๋ฅ GUI AWT(Abstract Windows Toolkit) AWT ๋์ด์์ฒด์ ๊ฐ์ ๊ณตํ๋์์์์ด์ฉํ์ฌ์์ปดํฌ๋ํธ๋ฅผ์์ฑ
More informationJMF3_์ฌ๋น๊ตฌ.PDF
JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:
More information5แแ กแผ.key
JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!
More informationPowerPoint ํ๋ ์ ํ ์ด์
@ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field
More informationPowerPoint Presentation
๊ฐ์ฒด์งํฅํ๋ก๊ทธ๋๋ฐ ์ด๋ฒคํธ์ฒ๋ฆฌ ์์์ด ssw5176@kangwon.ac.kr ์ด๋ฒคํธ - ๊ตฌ๋ํ๋ก๊ทธ๋๋ฐ ์ด๋ฒคํธ - ๊ตฌ๋ํ๋ก๊ทธ๋๋ฐ (event-driven programming): ํ๋ก๊ทธ๋จ์์คํ์ด์ด๋ฒคํธ์๋ฐ์์์ํ์ฌ๊ฒฐ์ ๋๋๋ฐฉ์ 2 ์ด๋ฒคํธ์ฒ๋ฆฌ๊ณผ์ 3 ์ด๋ฒคํธ๋ฆฌ์ค๋ ๋ฐ์๋์ด๋ฒคํธ๊ฐ์ฒด์๋ฐ์ํ์ฌ์์ด๋ฒคํธ๋ฅผ์ฒ๋ฆฌํ๋๊ฐ์ฒด๋ฅผ์ด๋ฒคํธ๋ฆฌ์ค๋ (event listener) ๋ผ๊ณ ํ๋ค. 4 ์ด๋ฒคํธ์ฒ๋ฆฌ๊ณผ์
More informationJava Coding Standard
Revision รฟ JSTORM http:www.jstorm.pe.kr Revision: Document Information Document title: Document file name: ( รฟ, 1.0,draft).doc Revision number: Issued by: < รฟ > (mailto:
More informationOrcad Capture 9.x
OrCAD Capture Workbook (Ver 10.xx) 0 Capture 1 2 3 Capture for window 4.opj ( OrCAD Project file) Design file Programe link file..dsn (OrCAD Design file) Design file..olb (OrCAD Library file) file..upd
More information09-interface.key
9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1
More informationCluster management software
์๋ฐํ๋ก๊ทธ๋๋ฐ (OCJP ๊ตญ์ ๊ณต์ธ์๊ฒฉ์ทจ๋์ค์ฌ ) ์ถฉ๋ถ๋ํ๊ต์ ๋ณดํต์ ๊ณตํ๋ถ ์ต๋ฏผ ์ด๋ฒคํธ์ฒ๋ฆฌ ์ง๊ธ๊น์ง GUI ๋ฅผ๊ตฌ์ฑํ๋ Component ์์ข ๋ฅ์์ด Component ๋ค์ Container ์์์ ์ ํ๊ฒ๋ฐฐ์นํ๊ธฐ์ํ LayoutManager ๋ฅผํ์ตํ์์ ์์์๋ง๋ค์๋ GUI ํ๋ก๊ทธ๋จ์๋ชจ์๋ง๊ทธ๋ด๋ฏํ ๋ฟ, ์ค์ Button ์๋๋ฅด๊ฑฐ๋, Frame ์ฐ์ธก์๋จ์ X ํ์๋ฅผํด๋ฆญํด๋์๋ฌด๋ฐ๋์์ํ์ง์์์ด๋ฒคํธ์ฒ๋ฆฌ๊ฐํฌํจ๋์ด์์ง์๊ธฐ๋๋ฌธ
More informationNo Slide Title
์ฌ๊ฑด์ฒ๋ฆฌ์ GUI ํ๋ก๊ทธ๋๋ฐ ์ด์ถฉ๊ธฐ ๋ช ์ง๋ํ๊ต์ปดํจํฐ๊ณตํ๊ณผ ์ฌ๊ฑด ์ฌ๊ฑด์์ฐ๋ฆฌ๊ฐ๊ด์ฌ์๊ฐ์ง์ง๋ชจ๋ฅด๋์ด๋ค์ผ์ด์ผ์ด๋๋๊ฒ์๋ํ๋ด๋๊ฐ์ฒด์ด๋ค. ์๋ฅผ๋ค๋ฉด, ๋ค์์ด์ผ์ด๋ ๋ํ๋ก๊ทธ๋จ์ด์ด๋ค์ผ์์ํํด์ผํ๋๊ฒฝ์ฐ์์ฌ๊ฑด์ด๋ฐ์ํ๋ค : 1. ๋ง์ฐ์ค๋ฅผํด๋ฆญํ๋ค. 2. ๋จ์ถ๋ฅผ๋๋ฅธ๋ค. 3. ํค๋ณด๋์ํค๋ฅผ๋๋ฅธ๋ค. 4. ๋ฉ๋ดํญ๋ชฉ์์ ํํ๋ค. 2 ์ฌ๊ฑด ์ฌ๊ฑด์์ปดํฌ๋ํธ์์์ฌ์ฉ์๋์์คํ ์์ํ์ฌ๋ฐ์ํ๋์ผ์ด๋ค. ์๋ฐ๋์ฌ๊ฑด์๋ํ๋ด๋๋ง์์ฌ๊ฑดํด๋์ค๋ฅผ์ ๊ณตํ๋ค.
More information์ฌ๋ผ์ด๋ 1
์ด๋ฒคํธ () ๋? - ์ฌ์ฉ์๊ฐ์ ๋ ฅ์ฅ์น ( ํค๋ณด๋, ๋ง์ฐ์ค๋ฑ ) ๋ฑ์์ด์ฉํด์๋ฐ์ํ๋์ฌ๊ฑด - ์ด๋ฒคํธ๋ฅผ์ฒ๋ฆฌํ๋ํ๋ก๊ทธ๋จ์์ด๋ฒคํธ๊ฐ๋ฐ์ํ ๋๊น์ง๋ฌดํ๋ฃจํ๋ฅผ๋๋ฉด์๋๊ธฐ์ํ์์๋๋ค. ์ด๋ฒคํธ๊ฐ๋ฐ์ํ๋ฉด๋ฐ์ํ์ด๋ฒคํธ์์ข ๋ฅ์๋ฐ๋ผํน์ ํ์์ ์์ํํ๋ค. - ์ด๋ฒคํธ๊ด๋ จํ๋ก๊ทธ๋จ์์ฑ์์ํด java.awt.event.* ํจํค์ง๊ฐํ์ - ๋ฒํผ์๋๋ฅธ๊ฒฝ์ฐ, 1 ๋ฒํผํด๋ฆญ์ด๋ฒคํธ๋ฐ์ 2 ๋ฐ์ํ์ด๋ฒคํธ์ธ์ ( ์ด๋ฒคํธ๋ฆฌ์ค๋๊ฐ์ํ
More information๋น๊ธด์ฟก-์๋ฐ 00์๋ถ์
IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter
More informationDialog Box ์คํํ์ผ์ Web์ ํฌํจ์ํค๋ ๋ฐฉ๋ฒ
DialogBox Web 1 Dialog Box Web 1 MFC ActiveX ControlWizard workspace 2 insert, ID 3 class 4 CDialogCtrl Class 5 classwizard OnCreate Create 6 ActiveX OCX 7 html 1 MFC ActiveX ControlWizard workspace New
More informationPowerPoint ํ๋ ์ ํ ์ด์
@ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation
More information์ฌ๋ผ์ด๋ 1
13 ์ฅ. ์ค์์ฌ์ฉ๋ฐฉ๋ฒ ํ์ต๋ชฉํ ๋ ์ด์์๊ด๋ฆฌ์ ์ค์๊ตฌ์ฑ์์ ๋นํธ๋ฐ์คํ๋ก๊ทธ๋จ ์ค์์์์๋ด ์๋ค ์ค์๊ตฌ์ฑ์์ ๊ตฌ์ฑ์์ (Component) ์์ ฏ (widget) ์ด๋ผ๊ณ ๋๋ถ๋ฆ GUI์์ง์ด๋ฃ๋๋ชจ๋ ๊ฒ ํ ์คํธํ๋, ๋ฒํผ, ์คํฌ๋กค๋ชฉ๋ก, ๋ผ๋์ค๋ฒํผ๋ฑ javax.swing.jcomponent ์ํ์ํด๋์ค ๋ํํ๊ตฌ์ฑ์์, ๋ฐฐ๊ฒฝ๊ตฌ์ฑ์์๋ก๋๋จ JButton JFrame JPanel
More information์ 8์ฅ ์๋ฐ GUI ํ๋ก๊ทธ๋๋ฐ II
ํ๋ก๊ทธ๋๋จธ๋ฅผ์ํ Java 2, 4 ํ ์ 8์ฅ์๋ฐ GUI ํ๋ก๊ทธ๋๋ฐ II 8.1 MVC ์ค์๋ชจ๋ธ MVC (Model, View, Controller) ๋ชจ๋ธ ์ค์์ MVC ๋ชจ๋ธ์๊ธฐ์ด๋ฅผ๋๊ณ ์๋ค. MVC๋ Xerox์์ฐ๊ตฌ์์์ Smalltalk ์ธ์ด๋ฅผ๋ฐํ์ผ๋ก์ฌ์ฉ์์ธํฐํ์ด์ค๋ฅผ๊ฐ๋ฐํ๊ธฐ์ํ๋ฐฉ๋ฒ MVC๋ 3๊ฐ์๊ตฌ์ฑ์์๋ก๊ตฌ์ฑ Model : ์์ฉํ๋ก๊ทธ๋จ์์๋ฃ๋ฅผํํํ๊ธฐ์ํ๋ชจ๋ธ
More informationPowerPoint ํ๋ ์ ํ ์ด์
๋ช ํ JAVA Essential 1 2 ํ์ต๋ชฉํ 1. ์ค์์ปดํฌ๋ํธ๊ทธ๋ฆฌ๊ธฐ์ paintcomponent() ํ์ฉ 2. Graphics ๊ฐ์ฒด์๋ํ์ดํด 3. ๋ํ๊ทธ๋ฆฌ๊ธฐ์์น ํ๊ธฐ 4. ์ด๋ฏธ์ง๊ทธ๋ฆฌ๊ธฐ 5. repaint() ํ์ฉํ๊ธฐ 6. ๋ง์ฐ์ค์๊ทธ๋ํฝ์์ฉ ์ค์์ปดํฌ๋ํธ๊ทธ๋ฆฌ๊ธฐ, paintcomponent() 3 ์ค์์ํ์ธํ ๊ธฐ๋ณธ ๋ชจ๋ ์ปดํฌ๋ํธ๋์์ ์๋ชจ์์์ค์ค๋ก๊ทธ๋ฆฐ๋ค. ์ปจํ ์ด๋๋์์ ์๊ทธ๋ฆฐํ๊ทธ์์์์์ปดํฌ๋ํธ๋ค์๊ฒ๊ทธ๋ฆฌ๊ธฐ์ง์
More informationMicrosoft PowerPoint - java2-lecture5.ppt [ํธํ ๋ชจ๋]
์๋ฐ์์ GUI ์์ข ๋ฅ ์๋ฐ GUI & ์ด๋ฒคํธ์ฒ๋ฆฌ 514770-1 2017 ๋ ๋ดํ๊ธฐ 4/19/2017 ๋ฐ๊ฒฝ์ AWT(Abstract Windows Toolkit) ์ด์์ฒด์ ๊ฐ์ ๊ณตํ๋์์์์ด์ฉํ์ฌ์์ปดํฌ๋ํธ๋ฅผ์์ฑํ๋ค. SWING ์ค์์ปดํฌ๋ํธ๊ฐ์๋ฐ๋ก์์ฑ๋์ด์๊ธฐ๋๋ฌธ์์ด๋คํ๋ซํผ์์๋์ผ๊ด๋ํ๋ฉด์๋ณด์ฌ์ค์์๋ค. AWT AWT(Abstract Windows Toolkit) ์๋ฐ๊ฐ์ฒ์๋์์๋ํจ๊ป๋ฐฐํฌ๋
More information07 แแ กแแ กแแ ด แแ กแแ ฃแผแแ กแซ แแ ณแฏแ แ ขแแ ณ.key
[ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,
More information12-file.key
11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,
More informationMicrosoft PowerPoint - java1-lecture10.ppt [ํธํ ๋ชจ๋]
๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค์ด๋ฒคํธ๊ฐ์ฒด, ๋ฆฌ์ค๋ ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค (Graphical User Interface, ๊ฐ๋จํ GUI) ๋์ปดํฌ๋ํธ๋ค๋ก๊ตฌ์ฑ๋๋ค. 514760-1 2018 ๋ ๋ดํ๊ธฐ 5/15/2018 ๋ฐ๊ฒฝ์ ์๋ฐ์์ GUI ์์ข ๋ฅ AWT(Abatract Windows Toolkit) ์ด์์ฒด์ ๊ฐ์ ๊ณตํ๋์์์์ด์ฉํ์ฌ์์ปดํฌ๋ํธ๋ฅผ์์ฑํ๋ค. SWING
More informationConnection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET
135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26
More informationLCD Display
LCD Display SyncMaster 460DRn, 460DR VCR DVD DTV HDMI DVI to HDMI LAN USB (MDC: Multiple Display Control) PC. PC RS-232C. PC (Serial port) (Serial port) RS-232C.. > > Multiple Display
More information1
7์ฐจ์. ์ด์ฆ๋ฆฌ์ ํ์๋๋ฅผ ํ์ฉํ ์ธํฌ๊ทธ๋ํฝ ์ ์ 1. ์ด์ฆ๋ฆฌ ์ฌ์ดํธ์ ๋ํด ์์๋ณด๊ณ ์ฌ์ฉ์ ๋ฉ๋ด ์ตํ๊ธฐ 01. ์ด์ฆ๋ฆฌ(www.easel.ly) ์ฌ์ดํธ ์ ์ํ๊ธฐ ์ธํฌ๊ทธ๋ํฝ ์ ์์ ์ํ ์ด์ฆ๋ฆฌ ์ฌ์ดํธ๋ ๋ฌด๋ฃ๋ก ์ ๊ณต๋๋ ํ ํ๋ฆฟ์ ์ด์ฉํ์ฌ ๊ฐํธํ๊ฒ ์ธํฌ๊ทธ๋ ํฝ์ ๋ง๋ค ์ ์๋ ์ฌ์ดํธ์ ๋ ์ด์ฆ๋ฆฌ๋ ์ ๋ฃ, ๋ฌด๋ฃ ๊ตฌ๋ถ์ด ์๋ ์ฅ์ ์ด ์์ผ๋ฉฐ ๋ค๋ฅธ ์ธํฌ๊ทธ๋ํฝ ์ ์ ์ฌ์ดํธ๋ณด๋ค
More information(Microsoft PowerPoint - LZVNQBAJWGTC.ppt [\310\243\310\257 \270\360\265\345])
GUI ์ธํฐํ์ด์ค์์ด๋ฒคํธ ํ์ต๋ชฉํ ์๋์ฐํ๊ฒฝ์์์์ฑ๋ GUI ์ธํฐํ์ด์ค์์ด๋ฒคํธ๊ฐ๋ ์์ดํดํ๋ค. ๋ค์ํ์ปดํฌ๋ํธ์๋ํ์ด๋ฒคํธ๋ฅผ์ฒ๋ฆฌํ๋ค ์ด๋ฒคํธ๋? ์๋ฐ์ด๋ฒคํธ๋ ์ฌ์ฉ์๊ฐํค๋ณด๋, ๋ง์ฐ์ค๋ฑ์์ฅ์น๋ก๋ถํฐ AWT ์ปดํฌ๋ํธ์๋ฐ์์ํค๋๋ชจ๋ ์ฌ๊ฑด์์๋ฏธ ์ด๋ฒคํธ์ฃผ๋ํํ๋ก๊ทธ๋จ์์ฌ์ฉ์๋ก๋ถํฐ๋ฐ์๋์ด๋ฒคํธ๋ฅผ์ฒ๋ฆฌํ์ฌ์ฌ์ฉ์์์ํธ์์ฉ์๊ฐ๋ฅํ๊ฒํจ ์๋ฐ์ด๋ฒคํธ๋ชจ๋ธ ์ปดํจํฐ ํค๋ณด๋ ์ด์์ฒด์ ๋ง์ฐ์ค ์ด๋ฒคํธ๊ฐ์ฒด์๋ฐ๊ฐ์๋จธ์ ์ด๋ฒคํธ์์ค๊ฐ์ฒด์ด๋ฒคํธ๋ฆฌ์ค๋๊ฐ์ฒด์ ํ๋ฆฌ์ผ์ด์
More information์ 1์ฅ ์๋ฐ ์ธ์ด ์๊ฐ
์ 6์ฅ์๋ฐ์ค์ () ์ค์์๊ฐ 2 JFC (Java Foundation Classes) ์ค์์๋ณด๋ค์ธ๋ จ๋ํํ์ GUI ๋ฅผ์ ๊ณตํ๊ธฐ์ํด์๋ง๋ค์ด์ง์ฌ์ฉ์ ์ธํฐํ์ด์คํด๋์ค๋ค๋ชจ์ JFC ๊ตฌ์ฑ AWT Java 2D Accessibility ๋๋๊ทธ-์ค-๋๋ (drag-and-drop) ์ค์ (swing) ์ค์์๊ฐ 3 Set ๋ฐ๋ชจํ๋ก๊ทธ๋จ C:\> cd \demo\jfc\Set2
More information์ค๋ฒ๋ผ์ด๋ฉ (Overriding)
WindowEvent WindowEvent ์๋์ฐ๊ฐ์ด๋ฆฌ๊ฑฐ๋ (opened) ๋ซํ๋ (closed) ํ์ฑํ๋๊ฑฐ๋ (activated) ๋นํ์ฑํ๋ ๋ (deactivated) ์ต์ํ๋๊ฑฐ๋ (iconified) ๋ณต๊ท๋ ๋ (deiconified) ์๋์ฐ๋ซํ๋ฒํผ์๋๋ฅผ๋ (closing) WindowEvent ์์ ์ abstract class WindowListener
More information์ฌ๋ผ์ด๋ 1
12 ์ฅ. GUI ํ์ต๋ชฉํ GUI ์ด๋ฒคํธ, ์ด๋ฒคํธ๋ฆฌ์ค๋์์ด๋ฒคํธ์์ค๊ทธ๋ฆผ๊ทธ๋ฆฌ๊ธฐ๋ด๋ถํด๋์ค ์ฐฝ Jframe ์๋ชจ์ (Metal L&F) Jframe ์๋ชจ์ (Aqua L&F) ์ฐฝ์๋ง๋๋๋ฐฉ๋ฒ 1. ํ๋ ์ (JFrame) ๋ง๋ค๊ธฐ JFrame frame = new JFrame(); 2. ์์ ฏ๋ง๋ค๊ธฐ JButton button = new JButton( click me );
More informationInterstage5 SOAP์๋น์ค ์ค์ ๊ฐ์ด๋
Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service
More information์๋ฐ ํ๋ก๊ทธ๋๋ฐ
5 (kkman@mail.sangji.ac.kr) (Class), (template) (Object) public, final, abstract [modifier] class ClassName { // // (, ) Class Circle { int radius, color ; int x, y ; float getarea() { return 3.14159
More information<4D F736F F F696E74202D20C1A63236C0E520BED6C7C3B8B428B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java ์ 26 ์ฅ์ ํ๋ฆฟ ์ด๋ฒ์ฅ์์ํ์ตํ ๋ด์ฉ ์ ํ๋ฆฟ์๊ฐ ์ ํ๋ฆฟ์์ฑ๋ฐ์๊ฐ ์ ํ๋ฆฟ์์๋ช ์ฃผ๊ธฐ ์ ํ๋ฆฟ์์์๊ทธ๋ํฝ์ปดํฌ๋ํธ์์๊ฐ Applet API์์ด์ฉ ์น๋ธ๋ผ์ฐ์ ์์์์คํ๋๋์์ํ๋ก๊ทธ๋จ์ธ์ ํ๋ฆฟ์๋ํ์ฌํ์ตํฉ๋๋ค. ์ ํ๋ฆฟ์ด๋? ์ ํ๋ฆฟ์์นํ์ด์ง๊ฐ์ HTML ๋ฌธ์์์๋ด์ฅ๋์ด์คํ๋๋์๋ฐํ๋ก๊ทธ๋จ์ด๋ค. ์ ํ๋ฆฟ์์คํ์ํค๋๋๊ฐ์ง๋ฐฉ๋ฒ 1. ์น๋ธ๋ผ์ฐ์ ๋ฅผ์ด์ฉํ๋๋ฐฉ๋ฒ 2. Appletviewer๋ฅผ์ด์ฉํ๋๋ฐฉ๋ฒ
More informationDocsPin_Korean.pages
Unity Localize Script Service, Page 1 Unity Localize Script Service Introduction Application Game. Unity. Google Drive Unity.. Application Game. -? ( ) -? -?.. ์ค๋น์ฌํญ Google Drive. Google Drive.,.. - Google
More informationJMF2_์ฌ๋น๊ตฌ.PDF
JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet
More information8์ฅ.๊ทธ๋ํฝ ํ๋ก๊ทธ๋๋ฐ
์๋์ฐํ๋ ์ ๋ํ๊ทธ๋ฆฌ๊ธฐ์๊ณผํฐํธ์ด๋ฏธ์ง๊ทธ๋ฆฌ๊ธฐ๊ทธ๋ฆฌ๊ธฐ์์ฉ 2 ์๋์ฐํ๋ ์ ์ ๋ชฉํ์์ค์๊ฐ๋์๋์ฐ๋ฅผ์๋ฏธ ์์ฑ๊ณผ์ 1 JFrame ๊ฐ์ฒด์์ฑ 2 ํ๋ ์์ํฌ๊ธฐ์ค์ 3 ํ๋ ์์์ ๋ชฉ์ค์ 4 ๊ธฐ๋ณธ๋ซํ์ฐ์ฐ์ง์ 5 ํ๋ ์์ด๋ณด์ด๋๋ก๋ง๋ฆ. 3 ์๋์ฐํ๋ ์์์ [ ์์ 8.1 - EmptyFrameViewer.java] import javax.swing.*; public class EmptyFrameViewer
More informationMasoJava4_Dongbin.PDF
JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr
More informationilist.add(new Integer(1))๊ณผ ๊ฐ์ด ์ฌ์ฉํ์ง ์๊ณ ilist.add(1)๊ณผ ๊ฐ์ด ์ฌ์ฉํ ๊ฒ์ ์๋ฐ 5.0์ ์ถ๊ฐ๋ ๊ธฐ๋ณธ ์๋ฃํ๊ณผ ํด๋น ๊ฐ์ฒด ์๋ฃ ํ๊ณผ์ ์คํ ๋ฐ์ฑ/์ธ๋ฐ์ฑ ๊ธฐ๋ฅ์ ์ฌ์ฉํ ๊ฒ์ผ๋ก ์คํ ๋ฐ์ฑ์ด๋ ์๋ฐ ์ปดํ์ผ๋ฌ๊ฐ ๊ฐ์ฒด๋ฅผ ์๊ตฌํ๋ ๊ณณ์ ๊ธฐ๋ณธ ์๋ฃํ
๋ฐ์ ์ ๋ค๋ฆญ์ค(generics)๋ฅผ ๋์ ํ๊ธฐ ์ํ ์ฐ๊ตฌ๋ ์ด๋ฏธ 8๋ ์ ์ธ 1996๋ ๋ถํฐ๋ผ๊ณ ํ๋ค. ์ค์ ๋ก ์๋ฐ์ ์ ๋ค๋ฆญ์ค๋ฅผ ๋์ ํ ๋ ๋ช ๊ฐ์ง ๋ฐฉ์๋ค์ด ๋ ผ๋ฌธ์ผ๋ก ๋์ค๊ธฐ ์์ํ ๊ฒ์ด 1998๋ ์ด์์ ๊ฐ ์ํ๋ฉด ๋ฌด๋ ค 8๋ ์ด ์ง๋ ํ์์ผ ์๋ฐ 5.0์ ์ ๊ฒฉ ์ฑํ๋์๋ค๋ ๊ฒ์ ์ด๊ฒ์ด ์ผ๋ง๋ ์ด๋ ค์ด ์ผ์ด์๋ ํ๋ ๊ฒ์ ๋ณด์ฌ์ค๋ค. ์๋ฐ์ ์คํ์ ๊ฒฐ์ ํ๋ ํ์คํ ์ ์ฐจ์ธ
More informationCluster management software
์๋ฐ๋คํธ์ํฌํ๋ก๊ทธ๋๋ฐ (OCJP ๊ตญ์ ๊ณต์ธ์๊ฒฉ์ทจ๋์ค์ฌ ) ์ถฉ๋ถ๋ํ๊ต ์ต๋ฏผ java.awt Package java.awt ํจํค์ง๋์๋ฐ์ ํ๋ฆฌ์ผ์ด์ ํ๋ก๊ทธ๋๋ฐ์ธํฐํ์ด์ค (API : Application Programming Interface) ์์ผ๋ถ๋ก์๊ทธ๋ํฝ์ฒ๋ฆฌ๋ฅผ๋ด๋นํ๋์ปดํฌ๋ํธ๋ค์ํฌํจํฉ๋๋ค. ์ฆ, ํ๋ฉด์์์๋์ฐ๋ฅผ๊ทธ๋ฆฌ๊ณ , ๊ทธ์์๋ฒํผ์ด๋ํ ์คํธํ๋๋ฑ์๋ถ์ด๋๋ฐํ์ํ GUI
More informationfundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_fโฆ
Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue
More information(Microsoft PowerPoint - java1-lecture7.ppt [\310\243\310\257 \270\360\265\345])
๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค์ด๋ฒคํธ๊ฐ์ฒด, ๋ฆฌ์ค๋ ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค (Graphical User Interface, ๊ฐ๋จํ GUI) ๋์ปดํฌ๋ํธ๋ค๋ก๊ตฌ์ฑ๋๋ค. 514760-1 2016 ๋ ๊ฐ์ํ๊ธฐ 11/10/2016 ๋ฐ๊ฒฝ์ ์๋ฐ์์ GUI ์์ข ๋ฅ AWT(Abatract Windows Toolkit) ์ด์์ฒด์ ๊ฐ์ ๊ณตํ๋์์์์ด์ฉํ์ฌ์์ปดํฌ๋ํธ๋ฅผ์์ฑํ๋ค.
More informationNo Slide Title
๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ์ด์ถฉ๊ธฐ ๋ช ์ง๋ํ๊ต์ปดํจํฐ๊ณตํ๊ณผ ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค ๊ทธ๋ํฝ์ฌ์ฉ์์ธํฐํ์ด์ค (GUI) ๋์ฌ๋๊ณผ์ปดํจํฐ๊ฐ์์ํธ์์ฉ์์ํ์ฌ๋ - ์ปดํจํฐ์ธํฐํ์ด์ค (HCI) ์ค์ํ๋์ด๋ค. GUI ๋์ฌ์ฉ์๊ฐ์ปดํจํฐํ๋ฉด์์์๋๊ฐ์ฒด๋ค๊ณผ์ํธ์์ฉ์ํ๋์ธํฐํ์ด์ค์ด๋ค. ์ค๋๋ ์ฌ์ค์๊ฑฐ์๋ชจ๋ ์ปดํจํฐํ๋ซํผ์์ GUI ๊ฐ์ฌ์ฉ๋๊ณ ์๋ค. 2 GUI ํ๋ก๊ทธ๋๋ฐ GUI ํ๋ก๊ทธ๋จ์์คํ์ํค๋ฉด๋ฉ๋ด๊ฐ์๋์ฐฝ์ด๋จ๊ณ ์ฐฝ์๋์์ด์ฝ,
More informationuntitled
- -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int
More information10-Java Applet
JAVA Programming Language JAVA Applet Java Applet >APPLET< >PARAM< HTML JAR 2 JAVA APPLET HTML HTML main( ). public Applet 3 (HelloWorld.html) Applet
More informationEclipse ์ Firefox ๋ฅผ์ด์ฉํ Javascript ๊ฐ๋ฐ ๋ฐํ์ : ๋ฌธ๊ฒฝ๋ 11 ๋ 10 ์ 26 ์ผ์์์ผ
Eclipse ์ Firefox ๋ฅผ์ด์ฉํ Javascript ๊ฐ๋ฐ ๋ฐํ์ : ๋ฌธ๊ฒฝ๋ Introduce Me!!! Job Jeju National University Student Ubuntu Korean Jeju Community Owner E-Mail: ned3y2k@hanmail.net Blog: http://ned3y2k.wo.tc Facebook: http://www.facebook.com/gyeongdae
More informationI T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r
I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r Jakarta is a Project of the Apache
More information์ค๊ฐ๊ณ ์ฌ
๊ธฐ๋ง๊ณ ์ฌ ๋ด๋น๊ต์ : ๋จ๊ตญ๋ํ๊ต์์ฉ์ปดํจํฐ๊ณตํ๋ฐ๊ฒฝ์ ๋ต์๋ฐ๋์๋ต์์ง์๊ธฐ์ ํ ๊ฒ. ๊ณต๊ฐ์ด๋ถ์กฑํ ๊ฒฝ์ฐ๋ฐ๋์๋ต์์ง๋ช์ชฝ์๋ค์์๋ค๊ณ ๋ช ๊ธฐํ ํ๊ธฐ์ ํ ๊ฒ. ๊ทธ์ธ์๊ฒฝ์ฐ์๋ต์์ง๋ค์ชฝ์ด๋์ฐ์ต์ง์๊ธฐ์ ํ๋ด์ฉ์๋ต์์ผ๋ก์ธ์ ์ํจ. ๋ต ์๋๋ฐ๋์๋ค๋ชจ๋ฅผ์ณ์ํ์คํํ์ํ ๊ฒ. ๋ต์์ง์ํ๊ณผ, ํ๋ฒ, ์ด๋ฆ์ธ์๋ณธ์ธ์์ํธ (4 ์๋ฆฌ์ซ์ ) ๋ฅผ๊ธฐ์ ํ๋ฉด์ฑ์ ๊ณต๊ณ ์ํ๋ฒ๋์ ์ํธ๋ฅผ ์ฌ์ฉํ ๊ฒ์. // ArithmeticOperator
More informationDB ์๋ฐ์ดํฐ์ ์ฅ์์ํ์ ๋ ฅ์ฐฝ์ค๊ณ - JLabel, JTextField, JButton ์์ด์ฉํ์ ๋ ฅ์ฐฝ์ค๊ณ - 2 -
Swing ์์ด์ฉํ DB ์์ Swing Swing์ AWT์ํจ๊ป Java2์์ถ๊ฐ๋ GUI ์ฒ๋ฆฌํจํค์ง์ด๋ค. AWT๋ํด๋น์ปดํจํฐ์ OS๊ฐ๊ฐ์ง๊ณ ์๋์ปดํฌ๋ํธ๋ฅผ์ด์ฉํ๊ธฐ๋๋ฌธ์์ฌ์ฉ์ปดํจํฐ์์ข ์์ ์ธ GUI๋ฅผ์ ๊ณตํ๋ค. ๊ทธ๋ฌ๋ฏ๋ก, OS์์ข ๋ฅ์๋ฐ๋ผํ๋ฉด์์ถ๋ ฅ๋๋ GUI๊ฐ๋ค๋ฅด๊ฒ๋๋ค. ๋ฐ๋ฉด์ Swing์ JVM์ด์ง์ Swing ํจํค์ง๋ฅผ์ฌ์ฉํด์๊ตฌํํ๊ธฐ๋๋ฌธ์ OS๊ฐ์๋ก๋ฌ๋ผ๋๋์ผํํ๋ฉด์์ ๊ณตํ๋์ฅ์ ์๊ฐ์ง๊ณ ์๋ค.
More informationMAX+plus II Getting Started - ๋ฌด์์ ๋ฐ๋ผํ๊ธฐ
๋ฌด์์ ๋ฐ๋ผํ๊ธฐ 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,
More information03-JAVA Syntax(2).PDF
JAVA Programming Language Syntax of JAVA (literal) (Variable and data types) (Comments) (Arithmetic) (Comparisons) (Operators) 2 HelloWorld application Helloworldjava // class HelloWorld { //attribute
More information03์ฅ
CHAPTER3 ( ) Gallery 67 68 CHAPTER 3 Intent ACTION_PICK URI android provier MediaStore Images Media EXTERNAL_CONTENT_URI URI SD MediaStore Intent choosepictureintent = new Intent(Intent.ACTION_PICK, รซ
More information2011๋ 10์ ์ดํ c 2011 Sony Corporation. All rights reserved. ์๋ฉด ํ๊ฐ ์์ด ์ ์ฒด ๋๋ ์ผ๋ถ๋ฅผ ๋ณต์ ํ๋ ๊ฒ์ ๊ธํฉ๋๋ค. ๊ธฐ๋ฅ ๋ฐ ๊ท๊ฒฉ์ ํต๋ณด ์์ด ๋ณ๊ฒฝ๋ ์ ์์ต๋๋ค. Sony์ Sony ๋ก๊ณ ๋ Sony์ ์ํ์ ๋๋ค. G L
HXR-NX3D1์ฉ 3D ์ํฌํ๋ก ๊ฐ์ด๋๋ถ 2011๋ 10์ ์ดํ c 2011 Sony Corporation. All rights reserved. ์๋ฉด ํ๊ฐ ์์ด ์ ์ฒด ๋๋ ์ผ๋ถ๋ฅผ ๋ณต์ ํ๋ ๊ฒ์ ๊ธํฉ๋๋ค. ๊ธฐ๋ฅ ๋ฐ ๊ท๊ฒฉ์ ํต๋ณด ์์ด ๋ณ๊ฒฝ๋ ์ ์์ต๋๋ค. Sony์ Sony ๋ก๊ณ ๋ Sony์ ์ํ์ ๋๋ค. G Lens, Exmor, InfoLITHIUM, Memory
More informationPowerPoint ํ๋ ์ ํ ์ด์
@ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability
More informationJTable๊ณผ MVC(Model-View-Controller) ๊ตฌ์กฐ - ๋ชจ๋ธ-๋ทฐ-์ปจํธ๋กค๋ฌ๊ตฌ์กฐ๋๋ฐ์ดํฐ์์ ์ฅ๊ณผ์ ๊ทผ์๋ํ์ ๊ณต์๋ชจ๋ธ์ด๋ด๋นํ๊ณ , ํ๋ฉดํ์๋๋ทฐ, ์ด๋ฒคํธ์์ฒ๋ฆฌ๋์ปจํธ๋กค๋ฌ๊ฐํ๋๋ก๊ฐ์ญํ ์๊ตฌ๋ถํ๊ตฌ์กฐ์ด๋ค. ์ฆ, ์ญํ ์๋ถ๋ด์ํตํ์ฌ์ํธ๊ฐ์์ํฅ์์ต์ํํ๊ณ ๊ฐ์์์๋ ๋ฆฝ์ฑ์๋ณด์ฅํ์ฌ๋ ์
JTable ์์์ฌ์ฉํ๋ Model ๊ฐ์ฒด JTable - JTable์๋ฐ์ดํฐ๋ฒ ์ด์ค์๊ฒ์๊ฒฐ๊ณผ๋ฅผ GUI์๋ณด์ฌ์ฃผ๊ธฐ์ํด์ฌ์ฉ๋๋์ปดํฌ๋ํธ์ด๋ค. ๊ฐ๋ก์์ธ๋ก๋ก๊ตฌ์ฑ๋ํ ์ด๋ธ์์์ฌ์ฉํด์ํ๊ณผ์ด์๋ฐ์ดํฐ๋ฅผ์์น์ํจ๋ค. - JTable์์ฌ์ฉํ๋๋ฐฉ๋ฒ์๋ค์๊ณผ๊ฐ๋ค. 1 ํ ์ด๋ธ์์ถ๋ ฅ๋ ๋ฐ์ดํฐ๋ฅผ 2์ฐจ์๋ฐฐ์ด์์ ์ฅํ๋ค. Object[][] records = { {..., {..., {... ; 2 ์ ๋ชฉ์ผ๋ก์ฌ์ฉํ ๋ฌธ์ ์ด์
More informationJavaPrintingModel2_JunoYoon.PDF
2 JSTORM http://wwwjstormpekr 2 Issued by: < > Revision: Document Information Document title: 2 Document file name: Revision number: Issued by: Issue Date:
More informationPowerPoint Presentation
๊ฐ์ฒด์งํฅํ๋ก๊ทธ๋๋ฐ ์ธํฐํ์ด์ค, ๋๋ค์, ํจํค์ง ( ์ค์ต ) ์์์ด ssw5176@kangwon.ac.kr ์์ 1. ํ๋คํธ์ํน public interface RemoteControl { public void turnon(); // ๊ฐ์ ์ ํ์์ผ ๋ค. public void turnoff(); // ๊ฐ์ ์ ํ์๋๋ค. ์ธํฐํ์ด์ค๋ฅผ๊ตฌํ public class Television
More informationPowerPoint ํ๋ ์ ํ ์ด์
๋ช ํ JAVA Essential 1 2 ํ์ต๋ชฉํ 1. ์ค์์ปดํฌ๋ํธ์ข ๋ฅ์ดํด 2. JLabel๋ก๋ฌธ์์ด๊ณผ์ด๋ฏธ์ง์ถ๋ ฅ 3. JButton์ผ๋ก๋ฒํผ๋ง๋ค๊ธฐ 4. JCheckBox๋ก์ฒดํฌ๋ฐ์ค๋ง๋ค๊ธฐ 5. JRadioButton์ผ๋ก๋ผ๋์ค๋ฒํผ๋ง๋ค๊ธฐ 6. JTextField๋กํ์ค์ ๋ ฅ์ฐฝ๋ง๋ค๊ธฐ 7. JTextArea๋ก์ฌ๋ฌ์ค์์ ๋ ฅ์ฐฝ๋ง๋ค๊ธฐ 8. JList๋ก๋ฆฌ์คํธ๋ง๋ค๊ธฐ 9. JComboBox๋ก์ฝค๋ณด๋ฐ์ค๋ง๋ค๊ธฐ
More informationMicrosoft Word - java18-1-final-answer.doc
๊ธฐ๋ง๊ณ ์ฌ ๋ด๋น๊ต์ : ๋จ๊ตญ๋ํ๊ต์์ฉ์ปดํจํฐ๊ณตํ๋ฐ๊ฒฝ์ ๋ต์๋ฐ๋์๋ต์์ง์๊ธฐ์ ํ ๊ฒ. ๊ณต๊ฐ์ด๋ถ์กฑํ ๊ฒฝ์ฐ๋ฐ๋์๋ต์์ง๋ช์ชฝ์๋ค์์๋ค๊ณ ๋ช ๊ธฐํํ๊ธฐ์ ํ ๊ฒ. ๊ทธ์ธ์๊ฒฝ์ฐ์๋ต์์ง๋ค์ชฝ์ด๋์ฐ์ต์ง์๊ธฐ์ ํ๋ด์ฉ์๋ต์์ผ๋ก์ธ์ ์ํจ. ๋ต์๋๋ฐ๋์๋ค๋ชจ๋ฅผ์ณ์ํ์คํํ์ํ ๊ฒ. ๋ต์์ง์ํ๊ณผ, ํ๋ฒ, ์ด๋ฆ์ธ์๋ณธ์ธ์์ํธ (4์๋ฆฌ์ซ์ ) ๋ฅผ๊ธฐ์ ํ๋ฉด์ฑ์ ๊ณต๊ณ ์ํ๋ฒ๋์ ์ํธ๋ฅผ์ฌ์ฉํ ๊ฒ์. 1. ๋ค์ sub1 ๊ณผ sub2
More information13รรฅรรยฐยกยบร
13 CHAPTER 13 CHAPTER 2 3 4 5 6 7 06 android:background="#ffffffff"> 07
More information