- 212 名前:デフォルトの名無しさん mailto:sage [2008/01/18(金) 17:55:01 ]
- >>207
1の方法でもちゃんと動いたぞ import略 public class Test {public static void main(String[] args) {SwingUtilities.invokeLater(new Runnable() {public void run() { JLabel label = new JLabel(new ImageIcon(getClass().getResource("image.png"))); label.setLayout(new FlowLayout()); label.add(new JButton("button")); JPanel panel = new JPanel(new BorderLayout()); panel.add(label); JFrame frame = new JFrame(); frame.add(panel); frame.pack(); frame.setVisible(true); }});}}
|

|