@@ -0,0 +1,1264 @@
+package jp.ac.aitech.maslab.ando.javasample;%0A%0Aimport java.awt.BorderLayout;%0Aimport java.awt.Color;%0A%0Aimport javax.swing.JFrame;%0Aimport javax.swing.JLabel;%0Aimport javax.swing.border.LineBorder;%0A%0Apublic class SwingBoarderLayoutSample %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09JFrame jFrame = new JFrame(%22BoarderLayoutSample%22);%0A%09%09jFrame.setSize(400, 400);%0A%09%09jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A%0A%09%09// BoarderLayout%E3%82%92%E8%A8%AD%E5%AE%9A%0A%09%09jFrame.setLayout(new BorderLayout());%0A%0A%09%09// %E3%82%B3%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%8D%E3%83%B3%E3%83%88%E3%81%AE%E7%94%A8%E6%84%8F%0A%09%09JLabel north = new JLabel(%22NORTH%22, JLabel.CENTER);%0A%09%09JLabel south = new JLabel(%22SOUTH%22, JLabel.CENTER);%0A%09%09JLabel east = new JLabel(%22EAST%22, JLabel.CENTER);%0A%09%09JLabel west = new JLabel(%22WEST%22, JLabel.CENTER);%0A%09%09JLabel center = new JLabel(%22CENTER%22, JLabel.CENTER);%0A%0A%09%09// %E5%A2%83%E7%95%8C%E7%B7%9A%EF%BC%88Boarder%EF%BC%89%E3%82%92%E6%8F%8F%E7%94%BB%0A%09%09north.setBorder(new LineBorder(Color.RED));%0A%09%09south.setBorder(new LineBorder(Color.RED));%0A%09%09east.setBorder(new LineBorder(Color.RED));%0A%09%09west.setBorder(new LineBorder(Color.RED));%0A%09%09center.setBorder(new LineBorder(Color.RED));%0A%0A%09%09// %E7%AC%AC%E4%BA%8C%E3%83%91%E3%83%A9%E3%83%A1%E3%82%BF%E3%81%A7%E5%A0%B4%E6%89%80%E3%82%92%E6%8C%87%E5%AE%9A%0A%09%09jFrame.add(north, BorderLayout.NORTH);%0A%09%09jFrame.add(south, BorderLayout.SOUTH);%0A%09%09jFrame.add(east, BorderLayout.EAST);%0A%09%09jFrame.add(west, BorderLayout.WEST);%0A%09%09jFrame.add(center, BorderLayout.CENTER);%0A%0A%09%09jFrame.setVisible(true);%0A%09%7D%0A%0A%7D%0A

Add Source