본문 바로가기
반응형

전체 글223

자바 소스코드: Clip 사용 예제(클리핑) package javaapplication15; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsClipEx extends JFrame{ GraphicsClipEx(){ this.setTitle("Clip 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(300,400); this.setVisibl.. 2016. 11. 12.
자바 소스코드: drawImage 사용 예제3(이미지의 일부분을 크기 조절하여 그리기 package javaapplication14; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsDrawImageEx3 extends JFrame{ GraphicsDrawImageEx3(){ this.setTitle("drawImage 사용 예제2"); 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.
자바 소스코드: drawImage 사용 예제2(패널의 크기에 맞추기) package javaapplication13; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsDrawImageEx2 extends JFrame{ GraphicsDrawImageEx2(){ this.setTitle("drawImage 사용 예제2"); 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.
자바 소스코드: 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.
반응형