| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

差分

ナビゲーションに移動 検索に移動
編集の要約なし
==[[Swing レイアウト 3]]==
[[Swing]] |
====LayoutManagerのカスタマイズ====
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.[[JFrame]];
import javax.swing.JPanel;
import javax.swing.SwingUtilities[[Swing]]Utilities;
import javax.swing.UIManager;
@SuppressWarnings("serial")
public class LayoutTest3 extends [[JFrame ]] {
/**
* Custom layout test
*/
public void testCustomLayout() {
[[JFrame ]] frame = new [[JFrame]]("Custom Layout Test");
Container pane = frame.getContentPane();
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel[[Windows]]LookAndFeel");
// UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
}
SwingUtilities[[Swing]]Utilities.invokeLater( new Runnable[[R]]unnable() {
public void run() {
LayoutTest3 lt = new LayoutTest3();
lt.setDefaultCloseOperation([[JFrame]].EXIT_ON_CLOSE);
lt.setVisible(true);
}

案内メニュー