JAVA/GUI - Swing

Layout - FlowLayout

DesignatedRoom 2020. 10. 24. 22:47

Layout은 콤포넌트 배치 방법을 지정한다.

 

FlowLayoutFrame.java

소스 파일

FlowLayoutFrame.java
0.00MB

 

 

 

FlowLayoutDemo.java

소스 코드

더보기
import javax.swing.JFrame;

public class FlowLayoutDemo
{
   public static void main( String args[] )
   { 
      FlowLayoutFrame flowLayoutFrame = new FlowLayoutFrame(); 
      
      flowLayoutFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
      flowLayoutFrame.setSize( 300, 75 ); // set frame size
      flowLayoutFrame.setVisible( true ); // display frame
   } 
} 

 

 

프로그램 실행결과