본문 바로가기
반응형

자바101

자바 소스코드: drawImage 사용 예제(이미지 그리기) package javaapplication12; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsDrawImageEx1 extends JFrame{ GraphicsDrawImageEx1(){ this.setTitle("drawImage 사용 예제1"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(300,40.. 2016. 11. 12.
자바 소스코드: 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.
반응형