자바GUI실전프로그래밍2_장대원.PDF

Size: px
Start display at page:

Download "자바GUI실전프로그래밍2_장대원.PDF"

Transcription

1 <JSTORM> JAVA GUI - 2 JSTORM

2 JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: <10> Issued by: Issue Date: <2000/8/23 > Status: GUI 2_ doc < > dwjang@jkdsoftcokr : < > junoyoon@orgionet final Content Information Audience Abstract Reference Benchmark information GUI SWING - SWING SWING JSTORM <2/37>

3 JAVA GUI - 2 Issued by: < > Document Approvals Signature date Signature date Revision History Revision Date Author Description of change JSTORM <3/37>

4 JAVA GUI - 2 Issued by: < > Table of Contents 5 JComponent 6 (Visibility) (Opaqueness) 7 8 JComponent 9 MVC 12 Model, View, Controller 13 GCad MVC17 27 (Composit) 27 JSTORM <4/37>

5 JAVA GUI - 2 Issued by: < > GUI! AWT GUI AWT (?) SwingSet ([ 1], SwingSet c:\jdk12\demo\jfc\swingset ), JSTORM <5/37>

6 JAVA GUI - 2 Issued by: < > GUI AWT GUI GUI (?) GUI ( ) GUI! Jr JComponent (JApplet, JDialog, JFrame, JWindow) JComponent ([ 1][ 2] ) JComponent JComponent JComponent AWTContainer Container Component JComponent JSTORM <6/37>

7 JAVA GUI - 2 Issued by: < > Component Container JComponent (Visibility) (Opaqueness) JComponent ( ) AWT JComponent 100 (Visibility) JFrame framesetvisible(true); dialogshow(); JButton buttonsetvisible(true); JButton JFrame? JFrame JButton AWT ( ) setopaque() truefalse true [ 2] 25 JSTORM <7/37>

8 JAVA GUI - 2 Issued by: < > ( ) [ 1] AboutDialogjava JComponent AWT AWT update() update() paint() update() update() paint() Canvas paint() AWT AWT public class GCanvas extends JPanel { public void paintcomponent(graphics g) { JSTORM <8/37>

9 JAVA GUI - 2 Issued by: < > JPanel AWTCanvas? AWTCanvas Canvas JCanvas Panel JPanel JPanel Canvas JPanel paintcomponent() AWT paint() paint() paintcomponent() AWT [1] paintcomponent() paintborder() paintchildren() paint() paint() [1] paint() paintcomponent() JComponent JSTORM <9/37>

10 JAVA GUI - 2 Issued by: < > JComponent JComponent JComponent JComponent Component Container [2] UI MVC(Model, View, Controller) MVC? [2] true setborder()? JSTORM <10/37>

11 JAVA GUI - 2 Issued by: < > JSTORM <11/37>

12 JAVA GUI - 2 Issued by: < > MVC MVC MVCModel, View, Controller MVC MVC MVC? ( ) (State) [ 2]?? [ 2], v JSTORM <12/37>

13 JAVA GUI - 2 Issued by: < >? 98 [ 2]? PLAF(Pluggable Look and F eel) Jr 5 MVC? (Control)? CIH Model, View, Controller [ 4] ( ) [ 4] UI JSTORM <13/37>

14 JAVA GUI - 2 Issued by: < > 98 ([ 3]) UI (Delegate) UI Model Model UI UI JButton ButtonModel ButtonUI UI MVC MVC JSTORM <14/37>

15 JAVA GUI - 2 Issued by: < > [ 1] ( ) public class GugudanModelDemo extends JFrame { public GugudanModelDemo() { super(" "); GugudanTableModel mymodel = new GugudanTableModel(); JTable table = new JTable(myModel); <<--- [1 ] getcontentpane()add(tablegettableheader(), BorderLayoutNORTH); getcontentpane()add(table, BorderLayoutCENTER); public static void main(string[] args) { GugudanModelDemo frame = new GugudanModelDemo(); framepack(); framesetvisible(true); // class GugudanTableModel extends AbstractTableModel { <<--- [2] public int getcolumncount() { return 9; public int getrowcount() { return 9; public String getcolumnname(int col) { return "" + (col+1); public Object getvalueat(int row, int col) { return new Integer((row+1)*(col+1)); [ 1][2] JSTORM <15/37>

16 JAVA GUI - 2 Issued by: < > AbstractTableModel [1 ] setmodel() MVC MVC MVC MVC GCad MVC MVC MVC GEditor GEditor GCad MVC [ 5]GCad Jr GEditor GStatus GStatus,,,, GStatus GStatus JSTORM <16/37>

17 JAVA GUI - 2 Issued by: < > GStatus GStatus GMenu, GToolBar, GColorTable? GStatus GStatus GStatus ~ GStatusMVC GMenu, GToolBar, GColorTable MVC? GMenu, GToolBar, GColorTable GStatusBar GUI [ 5] [ 7] GStatus GStatusgetOutlineColor() (GStatusBar), [ 5] MVC GCad, GDocument, GCanvas GCad( GEditor ), GCanvas GDocument GDocument GCad ( JSTORM <17/37>

18 JAVA GUI - 2 Issued by: < > ) GDocument GDocument GCanvas GDocument, GCanvas, GCad MVC GDocument GCanvasGDocument GCadGDocument GDocument MVC MVC MVC [ 2] GStatus package gcad; import gcadgobject*; import gcadgui*; import javaawt*; /////////////////////////////////////////////////////////////// public class GStatus { // private int m_selectedshape = GShapeLINE; // private Color m_backgroundcolor = Colorwhite; // private Color m_outlinecolor = Colorblack; // private int m_outlinewidth = 1; // private boolean m_isfill = false; // private Color m_fillcolor = Colorwhite; // Status (Controller) (View) private GToolBar m_toolbar; private GColorTable m_colortable; private GMenu m_menu; JSTORM <18/37>

19 JAVA GUI - 2 Issued by: < > private GStatusBar m_statusbar; // public void settoolbar(gtoolbar toolbar) { m_toolbar = toolbar; public void setmenu(gmenu menu) { m_menu = menu; public void setstatusbar(gstatusbar statusbar) { m_statusbar = statusbar; public void setcolortable(gcolortable colortable) { m_colortable = colortable; public int getselectedshape() { return m_selectedshape; public void setselectedshape(int shape) { m_selectedshape = shape; updateviews(); <<--- [1 ] public Color getbackgroundcolor() { return m_backgroundcolor; public void setbackgroundcolor(color color) { m_backgroundcolor = color; updateviews(); public Color getoutlinecolor() { return m_outlinecolor; public void setoutlinecolor(color color) { m_outlinecolor = color; updateviews(); public int getoutlinewidth() { return m_outlinewidth; public void setoutlinewidth(int width) { m_outlinewidth = width; public boolean isfill() { return m_isfill; public void setfill(boolean fill) { m_isfill = fill; updateviews(); JSTORM <19/37>

20 JAVA GUI - 2 Issued by: < > public Color getfillcolor() { return m_fillcolor; public void setfillcolor(color color) { m_fillcolor = color; updateviews(); // private void updateviews() { m_toolbarupdate(); m_colortableupdate(); m_menuupdate(); m_statusbarupdate(); <<--- [2 ] [ 2] [1 ]? GStatus [1 ] [2 ] update() [ 3][1 ] update(), GStatus MVC? [ 3][2 ]? (Static initializer) (Attribute)? { package gcadgui; [ 3] GColorTable import gcad*; import javaawt*; import javaawtevent*; import javaxswing*; JSTORM <20/37>

21 JAVA GUI - 2 Issued by: < > ///////////////////////////////////////////////////////////////// public class GColorTable extends JPanel { /** (, ) */ private static final Dimension TABLE_SIZE = new Dimension(2, 8); /** */ private static final Dimension CELL_SIZE = new Dimension(30, 30); /** */ private static final Color[] CELL_COLORS = { ; new Color( 0, 0, 0), new Color(128, 0, 0), new Color( 0, 128, 0), new Color(128, 128, 0), new Color( 0, 0, 128), new Color(128, 0, 128), new Color( 0, 128, 128), new Color(192, 192, 192), new Color(128, 128, 128), new Color(255, 0, 0), new Color( 0, 255, 0), new Color(255, 255, 0), new Color( 0, 0, 255), new Color(255, 0, 255), new Color( 0, 255, 255), new Color(255, 255, 255) /* private static final Color[] CELL_COLORS = new Color[TABLE_SIZEheight*TABLE_SIZEwidth]; // Static initializer <<--- [2 ] { int colorcount = TABLE_SIZEheight*TABLE_SIZEwidth; for (int i=0; i<colorcount; i++) { CELL_COLORS[i] = new Color(i*(255/colorCount), 0, 0); */ // Status JSTORM <21/37>

22 JAVA GUI - 2 Issued by: < > private GStatus m_status; /** */ private SelectedColorCell m_selectedcolorcell; public GColorTable(GStatus status) { m_status = status; m_statussetcolortable(this); setborder(borderfactorycreateetchedborder()); // JPanel standardcolorspane = new JPanel(); standardcolorspanesetlayout(new GridLayout(0, TABLE_SIZEwidth)); for (int i=0; i<cell_colorslength; i++) { standardcolorspaneadd(new ColorCell(CELL_COLORS[i])); // m_selectedcolorcell = new SelectedColorCell(); m_selectedcolorcelladdmouselistener(new MouseAdapter() { ); public void mouseclicked(mouseevent e) { Color oldcolor = m_statusgetoutlinecolor(); Color newcolor; newcolor = JColorChoosershowDialog(null, " ", oldcolor); m_statussetoutlinecolor(newcolor); // JPanel colorpane = new JPanel(); colorpanesetlayout(new BorderLayout()); colorpaneadd(standardcolorspane, BorderLayoutNORTH); colorpaneadd(new JSeparator(SwingConstantsVERTICAL)); colorpaneadd(m_selectedcolorcell, BorderLayoutSOUTH); setlayout(new BorderLayout()); add(colorpane, BorderLayoutNORTH); JSTORM <22/37>

23 JAVA GUI - 2 Issued by: < > public void update() { Color color = m_statusgetoutlinecolor(); m_selectedcolorcellrepaint(); <<--- [1 ] ///////////////////////////////////////////////////////////////// /** */ private class ColorCell extends JPanel { /** */ private Color m_color; // // : public ColorCell(Color color) { m_color = color; setborder(borderfactorycreateetchedborder()); setpreferredsize(cell_size); addmouselistener(new MouseAdapter() { public void mouseclicked(mouseevent e) { m_statussetoutlinecolor(m_color); ); // public void paintcomponent(graphics g) { gsetcolor(m_color); gfilloval(2, 2, getsize()width-4, getsize()height-4); ///////////////////////////////////////////////////////////////// private class SelectedColorCell extends JPanel { // public SelectedColorCell() { setborder(borderfactorycreateetchedborder()); setpreferredsize(new Dimension( 2*CELL_SIZEwidth, 2*CELL_SIZEheight)); JSTORM <23/37>

24 JAVA GUI - 2 Issued by: < > // public void paintcomponent(graphics g) { Color color = m_statusgetoutlinecolor(); gsetcolor(color); gfillrect(2, 2, getsize()width-4, getsize()height-4); package gcad; [ 4] GDocument import gcadgobject*; import javautil*; import javaio*; ////////////////////////////////////////////////////////////// public class GDocument { // private Vector m_shapes = new Vector(); // public void addshape(gshape shape) { m_shapesaddelement(shape); // public Enumeration getshapes() { return m_shapeselements(); // public void clear() { m_shapesremoveallelements(); // public void save() { JSTORM <24/37>

25 JAVA GUI - 2 Issued by: < > // public void load() { JSTORM <25/37>

26 JAVA GUI - 2 Issued by: < > JSTORM <26/37>

27 JAVA GUI - 2 Issued by: < > [ 8] CompositGObject (Composit) CompositGObject GCad (Grouping) GCrossedRectangle? (JTextField, JTextArea, JEditorPane JTextPane ) [ 5] (Composit) JSTORM <27/37>

28 JAVA GUI - 2 Issued by: < > [ 6] CompositGObject GObject (Composit) CompositGObject GObject CompositGObject GObject (implements) (is a) GObject [ 5][ 6] UML ( ) UML (implements) (extends) (Composit Aggregation) GObject, GShape, GLine [ 7][1 ] 2D 2D GEditor Graphics 2D 2D JDK 2D [ 5] GObject JSTORM <28/37>

29 JAVA GUI - 2 Issued by: < > package gcadgobject; import javaawt*; import javaio*; ///////////////////////////////////////////////////////////////// public interface GObject extends Serializable { // public abstract void draw(graphics g); // public abstract void erase(graphics g); [ 6] GShape package gcadgobject; import javaawt*; ///////////////////////////////////////////////////////////////// public abstract class GShape implements GObject { // public static final int LINE = 1; public static final int RECTANGLE = 2; public static final int SQUARE = 3; public static final int ELLIPSE = 4; public static final int CIRCLE = 5; // protected Color m_outlinecolor = Colorblack; // protected int m_outlinewidth = 1; // protected boolean m_isfill = false; JSTORM <29/37>

30 JAVA GUI - 2 Issued by: < > // protected Color m_fillcolor = Colorwhite; // public Color getoutlinecolor() { return m_outlinecolor; public void setoutlinecolor(color color) { m_outlinecolor = color; public int getoutlinewidth() { return m_outlinewidth; public void setoutlinewidth(int width) { m_outlinewidth = width; public boolean isfill() { return m_isfill; public void setfill(boolean fill) { m_isfill = fill; public Color getfillcolor() { return m_fillcolor; public void setfillcolor(color color) { m_fillcolor = color; // ( ) public abstract void setpenposition(point point); // public void erase(graphics g) { gsetxormode(colorwhite); draw(g); [ 7] GLine package gcadgobject; import javaawt*; ///////////////////////////////////////////////////////////////// public class GLine extends GShape { // private Point m_startpoint; // private Point m_ endpoint; JSTORM <30/37>

31 JAVA GUI - 2 Issued by: < > public GLine(Point point) { m_startpoint = point; m_endpoint = point; // ( ) public void setpenposition(point point) { m_endpoint = point; // public void draw(graphics g) { Graphics2D g2 = (Graphics2D)g; <<--- [1 ] Stroke oldstroke = g2getstroke(); g2setstroke(new BasicStroke(m_outlineWidth)); g2setcolor(m_outlinecolor); g2drawline(m_startpointx, m_startpointy, m_endpointx, m_endpointy); g2setstroke(oldstroke); GCad JSTORM <31/37>

32 JAVA GUI - 2 Issued by: < > JSTORM <32/37>

33 JAVA GUI - 2 Issued by: < > JSTORM <33/37>

34 JAVA GUI - 2 Issued by: < > JSTORM <34/37>

35 JAVA GUI - 2 Issued by: < > JSTORM <35/37>

36 JAVA GUI - 2 Issued by: < > JSTORM <36/37>

37 JAVA GUI - 2 Issued by: < > JSTORM <37/37>

9장.key

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

rmi_박준용_final.PDF

rmi_박준용_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 information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_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

<4D F736F F F696E74202D20C1A63233C0E520B1D7B7A1C7C820C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63233C0E520B1D7B7A1C7C820C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 23 장그래픽프로그래밍 이번장에서학습할내용 자바에서의그래픽 기초사항 기초도형그리기 색상 폰트 Java 2D Java 2D를이용한그리기 Java 2D 를이용한채우기 도형회전과평행이동 자바를이용하여서화면에그림을그려봅시다. 자바그래픽데모 자바그래픽의두가지방법 자바그래픽 AWT Java 2D AWT를사용하면기본적인도형들을쉽게그릴수있다. 어디서나잘실행된다.

More information

01-OOPConcepts(2).PDF

01-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 information

JMF2_심빈구.PDF

JMF2_심빈구.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 information

MasoJava4_Dongbin.PDF

MasoJava4_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 information

05-class.key

05-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

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft 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 information

11장.key

11장.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

Microsoft PowerPoint - ÀÚ¹Ù08Àå-1.ppt

Microsoft PowerPoint - ÀÚ¹Ù08Àå-1.ppt AWT 컴포넌트 (1) 1. AWT 패키지 2. AWT 프로그램과이벤트 3. Component 클래스 4. 컴포넌트색칠하기 AWT GUI 를만들기위한 API 윈도우프로그래밍을위한클래스와도구를포함 Graphical User Interface 그래픽요소를통해프로그램과대화하는방식 그래픽요소를 GUI 컴포넌트라함 윈도우프로그램만들기 간단한 AWT 프로그램 import

More information

제8장 자바 GUI 프로그래밍 II

제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 information

Microsoft PowerPoint - EEL2 Lecture10 -Swing and Event Handling.pptx

Microsoft 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

09-interface.key

09-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 information

<4D F736F F F696E74202D20C1A63236C0E520BED6C7C3B8B428B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63236C0E520BED6C7C3B8B428B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 26 장애플릿 이번장에서학습할내용 애플릿소개 애플릿작성및소개 애플릿의생명주기 애플릿에서의그래픽컴포넌트의소개 Applet API의이용 웹브라우저상에서실행되는작은프로그램인애플릿에대하여학습합니다. 애플릿이란? 애플릿은웹페이지같은 HTML 문서안에내장되어실행되는자바프로그램이다. 애플릿을실행시키는두가지방법 1. 웹브라우저를이용하는방법 2. Appletviewer를이용하는방법

More information

gnu-lee-oop-kor-lec10-1-chap10

gnu-lee-oop-kor-lec10-1-chap10 어서와 Java 는처음이지! 제 10 장이벤트처리 이벤트분류 액션이벤트 키이벤트 마우스이동이벤트 어댑터클래스 스윙컴포넌트에의하여지원되는이벤트는크게두가지의카테고리로나누어진다. 사용자가버튼을클릭하는경우 사용자가메뉴항목을선택하는경우 사용자가텍스트필드에서엔터키를누르는경우 두개의버튼을만들어서패널의배경색을변경하는프로그램을작성하여보자. 이벤트리스너는하나만생성한다. class

More information

JTable과 MVC(Model-View-Controller) 구조 - 모델-뷰-컨트롤러구조는데이터의저장과접근에대한제공은모델이담당하고, 화면표시는뷰, 이벤트의처리는컨트롤러가하도록각역할을구분한구조이다. 즉, 역할의분담을통하여상호간의영향을최소화하고각요소의독립성을보장하여독자

JTable과 MVC(Model-View-Controller) 구조 - 모델-뷰-컨트롤러구조는데이터의저장과접근에대한제공은모델이담당하고, 화면표시는뷰, 이벤트의처리는컨트롤러가하도록각역할을구분한구조이다. 즉, 역할의분담을통하여상호간의영향을최소화하고각요소의독립성을보장하여독자 JTable 에서사용하는 Model 객체 JTable - JTable은데이터베이스의검색결과를 GUI에보여주기위해사용되는컴포넌트이다. 가로와세로로구성된테이블을을사용해서행과열에데이터를위치시킨다. - JTable을사용하는방법은다음과같다. 1 테이블에출력될데이터를 2차원배열에저장한다. Object[][] records = { {..., {..., {... ; 2 제목으로사용할문제열을

More information

10장.key

10장.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

PowerPoint Presentation

PowerPoint 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 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

Chap12

Chap12 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 information

<4D F736F F F696E74202D20C1A63230C0E520BDBAC0AE20C4C4C6F7B3CDC6AE203128B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63230C0E520BDBAC0AE20C4C4C6F7B3CDC6AE203128B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 20 장스윙컴포넌트 1 이번장에서학습할내용 텍스트컴포넌트 텍스트필드 텍스트영역 스크롤페인 체크박스 라디오버튼 스윙에서제공하는기초적인컴포넌트들을살펴봅시다. 스윙텍스트컴포넌트들 종류텍스트컴포넌트그림 텍스트필드 JTextField JPasswordField JFormattedTextField 일반텍스트영역 JTextArea 스타일텍스트영역

More information

<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 19 장배치관리자 이번장에서학습할내용 배치관리자의개요 배치관리자의사용 FlowLayout BorderLayout GridLayout BoxLayout CardLayout 절대위치로배치 컨테이너안에서컴포넌트를배치하는방법에대하여살펴봅시다. 배치관리자 (layout manager) 컨테이너안의각컴포넌트의위치와크기를결정하는작업 [3/70] 상당히다르게보인다.

More information

비긴쿡-자바 00앞부속

비긴쿡-자바 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 information

02 C h a p t e r Java

02 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 information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ 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 information

Java Programing Environment

Java Programing Environment Lab Exercise #7 Swing Component 프로그래밍 2007 봄학기 고급프로그래밍 김영국충남대전기정보통신공학부 실습내용 실습과제 7-1 : 정규표현식을이용한사용자정보의유효성검사 (ATM 에서사용자등록용도로사용가능 ) 실습과제 7-2 : 숫자맞추기게임 실습과제 7-3 : 은행관리프로그램 고급프로그래밍 Swing Component 프로그래밍 2

More information

5장.key

5장.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 information

public class FlowLayoutPractice extends JFrame { public FlowLayoutPractice() { super("flowlayout Practice"); this. Container contentpane = getcontentp

public 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 information

PowerPoint Presentation

PowerPoint 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

중간고사

중간고사 기말고사 담당교수 : 단국대학교응용컴퓨터공학박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한 후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답 에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호 (4 자리숫자 ) 를기입하면성적공고시학번대신암호를 사용할것임. // ArithmeticOperator

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Graphical User Interface 배효철 th1g@nate.com 1 목차 자바의 GUI AWT와 Swing 패키지 Swing 클래스의특징 컨테이너와컴포넌트 Swing GUI 만들기 컨테이너와배치 2 자바의 GUI GUI 목적 그래픽이용, 사용자에게이해하기쉬운모양으로정보제공 사용자는마우스나키보드를이용하여쉽게입력 자바 GUI 특징 강력한 GUI 컴포넌트제공

More information

Microsoft PowerPoint - 14주차 강의자료

Microsoft PowerPoint - 14주차 강의자료 Java 로만드는 Monster 잡기게임예제이해 2014. 12. 2 게임화면및게임방법 기사초기위치 : (0,0) 아이템 10 개랜덤생성 몬스터 10 놈랜덤생성 Frame 하단에기사위치와기사파워출력방향키로기사이동아이템과몬스터는고정종료버튼클릭하면종료 Project 구성 GameMain.java GUI 환경설정, Main Method 게임객체램덤위치에생성 Event

More information

Microsoft PowerPoint - [JAVA프로그래밍]9장GUI

Microsoft PowerPoint - [JAVA프로그래밍]9장GUI 명품 JAVA Programming 1 제 9 장자바 GUI 기초, AWT 와스윙 (SWING) 자바의 GUI(Graphical User Interface) 2 GUI 목적 그래픽이용, 사용자에게이해하기쉬운모양으로정보제공 사용자는마우스나키보드를이용하여쉽게입력 자바 GUI 특징 강력한 GUI 컴포넌트제공 쉬운 GUI 프로그래밍 자바의 GUI 프로그래밍방법 GUI

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 그래픽 배효철 th1g@nate.com 1 목차 스윙컴포넌트그리기 자바의그래픽좌표시스템 Graphics 2 스윙컴포넌트그리기 스윙의그리기기본철학 모든컴포넌트는자신의모양을스스로그린다. 컨테이너는자신을그린후자식들에게그리기지시 public void paintcomponent(graphics g) 스윙컴포넌트가자신의모양을그리는메소드 JComponent 의메소드 모든스윙컴포넌트가이메소드를가지고있음

More information

Microsoft PowerPoint - java1-lecture11.ppt [호환 모드]

Microsoft 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 information

슬라이드 1

슬라이드 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 information

Microsoft PowerPoint - Java-03.pptx

Microsoft PowerPoint - Java-03.pptx JAVA 프로그래밍 Chapter 19. GUI 프로그래밍 1 GUI 환경에서작동하는프로그램 윈도우프로그램에대하여 텍스트모드프로그램과윈도우프로그램 a) 텍스트모드의프로그램 b) 윈도우프로그램 2 GUI 환경에서작동하는프로그램 -2 윈도우프로그램에대하여 텍스트모드프로그램과윈도우프로그램의구조적차이 3 윈도우프로그램의작성방법 윈도우프로그램의구조 네단계로실행되는윈도우프로그램

More information

<4D F736F F F696E74202D20C1A63138C0E520C0CCBAA5C6AE20C3B3B8AE28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63138C0E520C0CCBAA5C6AE20C3B3B8AE28B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 18 장이벤트처리 이번장에서학습할내용 이벤트처리의개요 이벤트 액션이벤트 Key, Mouse, MouseMotion 어댑터클래스 버튼을누르면반응하도록만들어봅시다. 이번장의목표 버튼을누르면버튼의텍스트가변경되게한다. 이벤트처리과정 이벤트처리과정 (1) 이벤트를발생하는컴포넌트를생성하여야한다. 이벤트처리과정 (2) 이벤트리스너클래스를작성한다.

More information

8장.그래픽 프로그래밍

8장.그래픽 프로그래밍 윈도우프레임 도형그리기색과폰트이미지그리기그리기응용 2 윈도우프레임 제목표시줄을갖는윈도우를의미 생성과정 1 JFrame 객체생성 2 프레임의크기설정 3 프레임의제목설정 4 기본닫힘연산지정 5 프레임이보이도록만듦. 3 윈도우프레임예제 [ 예제 8.1 - EmptyFrameViewer.java] import javax.swing.*; public class EmptyFrameViewer

More information

12-file.key

12-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 information

No Slide Title

No Slide Title 그래픽사용자인터페이스 이충기 명지대학교컴퓨터공학과 그래픽사용자인터페이스 그래픽사용자인터페이스 (GUI) 는사람과컴퓨터간의상호작용을위한사람 - 컴퓨터인터페이스 (HCI) 중의하나이다. GUI 는사용자가컴퓨터화면상에있는객체들과상호작용을하는인터페이스이다. 오늘날사실상거의모든컴퓨터플랫폼에서 GUI 가사용되고있다. 2 GUI 프로그래밍 GUI 프로그램은실행시키면메뉴가있는창이뜨고창에는아이콘,

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 명품 JAVA Essential 1 2 학습목표 1. 이벤트기반 GUI 프로그래밍이해 2. 자바 GUI 패키지이해 3. 스윙으로 GUI 프로그램작성 4. 컨테이너와컴포넌트, 배치 5. FlowLayout 배치관리자활용 6. BorderLayout 배치관리자활용 7. GridLayout 배치관리자활용 8. 배치관리자없는컨테이너만들기 자바의 GUI(Graphical

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

슬라이드 1

슬라이드 1 13 장. 스윙사용방법 학습목표 레이아웃관리자 스윙구성요소 비트박스프로그램 스윙을알아봅시다 스윙구성요소 구성요소 (Component) 위젯 (widget) 이라고도부름 GUI에집어넣는모든것 텍스트필드, 버튼, 스크롤목록, 라디오버튼등 javax.swing.jcomponent 의하위클래스 대화형구성요소, 배경구성요소로나뉨 JButton JFrame JPanel

More information

DB 에데이터저장을위한입력창설계 - JLabel, JTextField, JButton 을이용한입력창설계 - 2 -

DB 에데이터저장을위한입력창설계 - JLabel, JTextField, JButton 을이용한입력창설계 - 2 - Swing 을이용한 DB 작업 Swing Swing은 AWT와함께 Java2에추가된 GUI 처리패키지이다. AWT는해당컴퓨터의 OS가가지고있는컴포넌트를이용하기때문에사용컴퓨터에종속적인 GUI를제공한다. 그러므로, OS의종류에따라화면에출력되는 GUI가다르게된다. 반면에 Swing은 JVM이직접 Swing 패키지를사용해서구현하기때문에 OS가서로달라도동일한화면을제공하는장점을가지고있다.

More information

Java Coding Standard

Java 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 information

ch09

ch09 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 information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.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 information

No Slide Title

No Slide Title 사건처리와 GUI 프로그래밍 이충기 명지대학교컴퓨터공학과 사건 사건은우리가관심을가질지모르는어떤일이일어나는것을나타내는객체이다. 예를들면, 다음이일어날때프로그램이어떤일을수행해야하는경우에사건이발생한다 : 1. 마우스를클릭한다. 2. 단추를누른다. 3. 키보드의키를누른다. 4. 메뉴항목을선택한다. 2 사건 사건은컴포넌트에서사용자나시스템에의하여발생하는일이다. 자바는사건을나타내는많은사건클래스를제공한다.

More information

11-GUI.key

11-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 information

1

1 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

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 11 장상속 이번장에서학습할내용 상속이란? 상속의사용 메소드재정의 접근지정자 상속과생성자 Object 클래스 종단클래스 상속을코드를재사용하기위한중요한기법입니다. 상속이란? 상속의개념은현실세계에도존재한다. 상속의장점 상속의장점 상속을통하여기존클래스의필드와메소드를재사용 기존클래스의일부변경도가능 상속을이용하게되면복잡한 GUI 프로그램을순식간에작성

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ 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 information

Java ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class

Java ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class Linux JAVA 1. http://java.sun.com/j2se/1.4.2/download.html J2SE 1.4.2 SDK 2. Linux RPM ( 9 ) 3. sh j2sdk-1_4_2_07-linux-i586-rpm.bin 4. rpm Uvh j2sdk-1_4_2_07-linux-i586-rpm 5. PATH JAVA 1. vi.bash_profile

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 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 information

03장

03장 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 information

Microsoft PowerPoint - java2-lecture5.ppt [호환 모드]

Microsoft PowerPoint - java2-lecture5.ppt [호환 모드] 자바에서 GUI 의종류 자바 GUI & 이벤트처리 514770-1 2017 년봄학기 4/19/2017 박경신 AWT(Abstract Windows Toolkit) 운영체제가제공하는자원을이용하여서컴포넌트를생성한다. SWING 스윙컴포넌트가자바로작성되어있기때문에어떤플랫폼에서도일관된화면을보여줄수있다. AWT AWT(Abstract Windows Toolkit) 자바가처음나왔을때함께배포된

More information

Spring Data JPA Many To Many 양방향 관계 예제

Spring Data JPA Many To Many 양방향 관계 예제 Spring Data JPA Many To Many 양방향관계예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) 엔티티매핑 (Entity Mapping) M : N 연관관계 사원 (Sawon), 취미 (Hobby) 는다 : 다관계이다. 사원은여러취미를가질수있고, 하나의취미역시여러사원에할당될수있기때문이다. 보통관계형 DB 에서는다 : 다관계는 1

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 이벤트처리 손시운 ssw5176@kangwon.ac.kr 이벤트 - 구동프로그래밍 이벤트 - 구동프로그래밍 (event-driven programming): 프로그램의실행이이벤트의발생에의하여결정되는방식 2 이벤트처리과정 3 이벤트리스너 발생된이벤트객체에반응하여서이벤트를처리하는객체를이벤트리스너 (event listener) 라고한다. 4 이벤트처리과정

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 그래픽사용자인터페이스 손시운 ssw5176@kangwon.ac.kr 그래픽사용자인터페이스 그래픽사용자인터페이스 (Graphical User Interface, 간단히 GUI) 는컴포넌 트들로구성된다. 2 자바에서 GUI 의종류 GUI AWT(Abstract Windows Toolkit) AWT 는운영체제가제공하는자원을이용하여서컴포넌트를생성

More information

DocsPin_Korean.pages

DocsPin_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 information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 명품 JAVA Essential 1 2 학습목표 1. 스윙컴포넌트그리기와 paintcomponent() 활용 2. Graphics 객체에대한이해 3. 도형그리기와칠하기 4. 이미지그리기 5. repaint() 활용하기 6. 마우스와그래픽응용 스윙컴포넌트그리기, paintcomponent() 3 스윙의페인팅기본 모든컴포넌트는자신의모양을스스로그린다. 컨테이너는자신을그린후그위에자식컴포넌트들에게그리기지시

More information

Microsoft PowerPoint - ÀÚ¹Ù08Àå-2.ppt

Microsoft PowerPoint - ÀÚ¹Ù08Àå-2.ppt AWT 컴포넌트 (2) 1. 메뉴 2. 컨테이너와컨트롤 3. 배치관리자 메뉴관련클래스계층구조 Object MenuComponent MenuBar MenuItem Menu CheckboxMenuItem PopupMenu 메뉴 풀다운메뉴 제목표시줄밑의메뉴바를가짐 메뉴만들기과정 MenuBar 객체생성 MenuBar 에추가할 Menu 객체를생성 Menu 에추가할또다른서브

More information

Microsoft PowerPoint 자바-AWT컴포넌트(Ch8).pptx

Microsoft 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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ 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

제8장 자바 GUI 프로그래밍 II

제8장 자바 GUI 프로그래밍 II 프로그래머를위한 Java 2, 4 판 제8장자바 GUI 프로그래밍 II 8.1 MVC 스윙모델 MVC (Model, View, Controller) 모델 스윙은 MVC 모델에기초를두고있다. MVC란 Xerox의연구소에서 Smalltalk 언어를바탕으로사용자인터페이스를개발하기위한방법 MVC는 3개의구성요소로구성 Model : 응용프로그램의자료를표현하기위한모델

More information

10-Java Applet

10-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 information

JavaGeneralProgramming.PDF

JavaGeneralProgramming.PDF , Java General Programming from Yongwoo s Park 1 , Java General Programming from Yongwoo s Park 2 , Java General Programming from Yongwoo s Park 3 < 1> (Java) ( 95/98/NT,, ) API , Java General Programming

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 information

Microsoft PowerPoint - java1-lecture10.ppt [호환 모드]

Microsoft PowerPoint - java1-lecture10.ppt [호환 모드] 그래픽사용자인터페이스 그래픽사용자인터페이스이벤트객체, 리스너 그래픽사용자인터페이스 (Graphical User Interface, 간단히 GUI) 는컴포넌트들로구성된다. 514760-1 2018 년봄학기 5/15/2018 박경신 자바에서 GUI 의종류 AWT(Abatract Windows Toolkit) 운영체제가제공하는자원을이용하여서컴포넌트를생성한다. SWING

More information

( )부록

( )부록 A ppendix 1 2010 5 21 SDK 2.2. 2.1 SDK. DevGuide SDK. 2.2 Frozen Yoghurt Froyo. Donut, Cupcake, Eclair 1. Froyo (Ginger Bread) 2010. Froyo Eclair 0.1.. 2.2. UI,... 2.2. PC 850 CPU Froyo......... 2. 2.1.

More information

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형 바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인

More information

UML

UML Introduction to UML Team. 5 2014/03/14 원스타 200611494 김성원 200810047 허태경 200811466 - Index - 1. UML이란? - 3 2. UML Diagram - 4 3. UML 표기법 - 17 4. GRAPPLE에 따른 UML 작성 과정 - 21 5. UML Tool Star UML - 32 6. 참조문헌

More information

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

@OneToOne(cascade = = addr_id) private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a 1 대 1 단방향, 주테이블에외래키실습 http://ojcedu.com, http://ojc.asia STS -> Spring Stater Project name : onetoone-1 SQL : JPA, MySQL 선택 http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 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

Week3

Week3 2015 Week 03 / _ Assignment 1 Flow Assignment 1 Hello Processing 1. Hello,,,, 2. Shape rect() ellipse() 3. Color stroke() fill() color selector background() 4 Hello Processing 4. Interaction setup() draw()

More information

자바 쓰레드 능숙하게 다루기

자바 쓰레드 능숙하게 다루기 (, )..,., (!)....... Timer.,.,.. 8 9.,.. 14.,. (http :/ / www.j avaworld.com)........,... ThreadRunnable synchronized, wait (), notify (). Thread AWT,. C+ +, David FlanaganJ ava in a Nutshell C+ +. C+

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

Modern Javascript

Modern Javascript ES6 - Arrow Function Class Template String Destructuring Default, Rest, Spread let, const for..of Promises Module System Map, Set * Generator * Symbol * * https://babeljs.io/ Babel is a JavaScript compiler.

More information

JMF1_심빈구.PDF

JMF1_심빈구.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: 1_ doc Issue Date:

More information

03-JAVA Syntax(2).PDF

03-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 information

Microsoft PowerPoint - lec04_05.ppt [호환 모드]

Microsoft PowerPoint - lec04_05.ppt [호환 모드] JAVA 프로그래밍 4. 그래픽프로그래밍 한동일 학습목표 To be able to write simple GUI applications To display graphical shapes such as lines and ellipses To use colors To display drawings consisting of many shapes To read input

More information

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f JPA 에서 QueryDSL 사용하기위해 JPAQuery 인스턴스생성방법 http://ojc.asia, http://ojcedu.com 1. JPAQuery 를직접생성하기 JPAQuery 인스턴스생성하기 QueryDSL의 JPAQuery API를사용하려면 JPAQuery 인스턴스를생성하면된다. // entitymanager는 JPA의 EntityManage

More information

gnu-lee-oop-kor-lec06-3-chap7

gnu-lee-oop-kor-lec06-3-chap7 어서와 Java 는처음이지! 제 7 장상속 Super 키워드 상속과생성자 상속과다형성 서브클래스의객체가생성될때, 서브클래스의생성자만호출될까? 아니면수퍼클래스의생성자도호출되는가? class Base{ public Base(String msg) { System.out.println("Base() 생성자 "); ; class Derived extends Base

More information

JAVA PROGRAMMING 실습 08.다형성

JAVA PROGRAMMING 실습 08.다형성 2015 학년도 2 학기 1. 추상메소드 선언은되어있으나코드구현되어있지않은메소드 abstract 키워드사용 메소드타입, 이름, 매개변수리스트만선언 public abstract String getname(); public abstract void setname(string s); 2. 추상클래스 abstract 키워드로선언한클래스 종류 추상메소드를포함하는클래스

More information

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 8 장클래스와객체 I 이번장에서학습할내용 클래스와객체 객체의일생직접 메소드클래스를 필드작성해 UML 봅시다. QUIZ 1. 객체는 속성과 동작을가지고있다. 2. 자동차가객체라면클래스는 설계도이다. 먼저앞장에서학습한클래스와객체의개념을복습해봅시다. 클래스의구성 클래스 (class) 는객체의설계도라할수있다. 클래스는필드와메소드로이루어진다.

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

Contents. 1. PMD ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 2. Metrics ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 3. FindBugs ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 4. ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ

Contents. 1. PMD ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 2. Metrics ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 3. FindBugs ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 4. ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 정적분석서 - 영단어수집왕 - Team.# 3 과목명 소프트웨어모델링및분석 담당교수 유준범교수님 201011320 김용현 팀원 201111360 손준익 201111347 김태호 제출일자 2015-06-09 1 Contents. 1. PMD ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 2. Metrics

More information

모든스윙컴포넌트에는텍스트옆에이미지를추가로표시할수있다. ImageIcon image = new ImageIcon("image.gif"); JLabel label = new JLabel(" 이미지레이블 "); label.seticon(image);

모든스윙컴포넌트에는텍스트옆에이미지를추가로표시할수있다. 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 information

(Microsoft PowerPoint - java1-lecture7.ppt [\310\243\310\257 \270\360\265\345])

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

Microsoft Word - java18-1-final-answer.doc

Microsoft Word - java18-1-final-answer.doc 기말고사 담당교수 : 단국대학교응용컴퓨터공학박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호 (4자리숫자 ) 를기입하면성적공고시학번대신암호를사용할것임. 1. 다음 sub1 과 sub2

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ 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 information

JavaPrintingModel2_JunoYoon.PDF

JavaPrintingModel2_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 information

Java

Java Java http://cafedaumnet/pway Chapter 1 1 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength();

More information

(8) getpi() 함수는정적함수이므로 main() 에서호출할수있다. (9) class Circle private double radius; static final double PI= ; // PI 이름으로 로초기화된정적상수 public

(8) getpi() 함수는정적함수이므로 main() 에서호출할수있다. (9) class Circle private double radius; static final double PI= ; // PI 이름으로 로초기화된정적상수 public Chapter 9 Lab 문제정답 1. public class Circle private double radius; static final double PI=3.141592; // PI 이름으로 3.141592 로초기화된정적상수 (1) public Circle(double r) radius = r; (2) public double getradius() return

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television

More information