public class MyFrame extends JFrame
{
public MyFrame()
{
this.setSize(100, 100);
JPanel panel = new JPanel();
panel.setSize(300,300);
panel.setBackground(Color.red);
panel.add( new JLabel("1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"));
this.getContentPane().add( new JScrollPane( panel ) );
this.setVisible(true);
}
public static void main(String[] args)
{
new MyFrame();
}
}
Kaum macht mans richtig, schon funktionierts. 8)ak hat gesagt.:juut, jetzt klappts.