본문 바로가기
반응형

전체 글223

자바 소스코드: Fill 사용 예제 package javaapplication11; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsFillEx extends JFrame{ GraphicsFillEx(){ this.setTitle("Fill 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(100,350); this.setVisibl.. 2016. 11. 12.
자바 소스코드: drawPolygon 사용 예제 package javaapplication10; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsDrawPolygonEx extends JFrame{ GraphicsDrawPolygonEx(){ this.setTitle("drawPolygon 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(300.. 2016. 11. 12.
자바 소스코드: drawArc 사용 예제(원 그리기) package javaapplication9; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsDrawArcEx extends JFrame{ GraphicsDrawArcEx(){ this.setTitle("drawArc 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(300,300); this.s.. 2016. 11. 12.
자바 소스코드: drawLine 사용 예제(선 그리기) package javaapplication8; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsDrawLineEx extends JFrame{ GraphicsDrawLineEx(){ this.setTitle("drawLine 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(300,200); thi.. 2016. 11. 12.
반응형