eclipse -2-

索引サイト

画面




import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class test2100 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
private_ShowFrame();
}
});
}
private static void private_ShowFrame()
{
JFrame w_frame = new JFrame("java-2100");
w_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
w_frame.setSize(400,250);
w_frame.setVisible(true);
}
}

タブコンポーネント




import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTabbedPane;
import javax.swing.UIManager;

public class test2300 {
public static void main(String[] args) {
new test2300();
}
public test2300() {
JFrame frame = new JFrame("TabbedPane");

JTabbedPane w_tabPane = new JTabbedPane();

for (int idx = 0; idx < 3; idx++) {
w_tabPane.addTab(null, new JLabel(""));
w_tabPane.setTabComponentAt
(idx,
new JLabel("tab Index -" + idx + "-",
UIManager.getIcon("FileView.fileIcon"),
JLabel.TRAILING));
}
frame.add(w_tabPane);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 250);
frame.setVisible(true);
}
}





import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import java.awt.*;

public class test2350 {
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
private_ShowFrame();
}
});
}
private static void private_ShowFrame()
{
JFrame w_frame = new JFrame("java-2300");
w_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
w_frame.setSize(400,250);
w_frame.setVisible(true);

w_frame.setLayout(new GridLayout(4,3));

w_frame.add(new Button("Button-01"));
w_frame.add(new Button("Button-02"));
w_frame.add(new Button("Button-03"));
w_frame.add(new Button("Button-04"));
w_frame.add(new Button("Button-05"));
w_frame.add(new Button("Button-06"));
w_frame.add(new Button("Button-07"));
w_frame.add(new Button("Button-08"));
w_frame.add(new Button("Button-09"));
w_frame.add(new Button("Button-10"));
}
}




AX