Structured Programming
통합 모델링 언어는 객체 지향 프로그래밍 소프트웨어 집약 시스템을 개발할 때 산출물을 명세화, 시각화, 문서화할 때 사용한다.[2] UML은 아래와 같은 사항을 포함하여 시스템의 구조적 청사진을 시각화 하는 표준안을 제공한다: [출처]https://ko.wikipedia.org/wiki/%ED%86%B5%ED%95%A9_%EB%AA%A8%EB%8D%B8%EB%A7%81_%EC%96%B8%EC%96%B4
import javax.swing.JFrame;
public class DrawPanelTest
{
public static void main( String[] args )
{
DrawPanel panel = new DrawPanel90;
JFrame application = new JFrame();
application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
application.add( panel );
application.setSize( 250, 250 );
application.setVisible( true );
}
}
import java.awt.Graphics;
import javax.swing.JPanel;
public class DrawPanel extends JPanel
{
public void paintComponent( Graphics g )
{
super.paintComponent( g );
int width = getWidth();
int height = getHeight();
g.drawLine( 0, 0, width, height );
g.drawLine( 0, height, width, 0 );
}
}