본문 바로가기
반응형

자바101

자바 소스코드: 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.
자바 소스코드: Color, Font 사용 예제 package javaapplication7; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class GraphicsColorFontEx extends JFrame{ GraphicsColorFontEx(){ this.setTitle("Color, Font 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(400,500).. 2016. 11. 12.
자바 소스코드: setFont 사용 예제 package javaapplication6; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class setFontEx extends JFrame{ setFontEx(){ this.setTitle("setFont 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(600,300); this.setVisible(true);.. 2016. 11. 12.
자바 소스코드: setColor 사용 예제 package javaapplication5; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class setColorEx extends JFrame{ setColorEx(){ this.setTitle("setColor 사용 예제"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyPanel panel = new MyPanel(); this.add(panel, BorderLayout.CENTER); this.setLocationRelativeTo(null); this.setSize(300,300); this.setVisible(tru.. 2016. 11. 12.
반응형