Hallo, da ich keine Ahnung habe wo der Fehler liegt muss ich wohl ein neues Thema erstellen.
Ich habe ein JEditorpane mit einen Scrollbalken das funktioniert auch soweit.
Das ganze soll nun auf ein weiteren panel, mit einen weiteren Scrollbalken, das Problem ist aber das dieser schlichtweg nicht angezeigt wird und ich keine Ahnung habe wo der Fehler liegt.
Danke schonmal im vorraus 
Ich habe ein JEditorpane mit einen Scrollbalken das funktioniert auch soweit.
Das ganze soll nun auf ein weiteren panel, mit einen weiteren Scrollbalken, das Problem ist aber das dieser schlichtweg nicht angezeigt wird und ich keine Ahnung habe wo der Fehler liegt.
Java:
JFrame frame = new JFrame();
JPanel panel = new JPanel();
JPanel grundpanel = new JPanel();
JLabel label = new JLabel(" Termine:");
label.setFont(new Font("Serif", Font.PLAIN, 36));
JEditorPane text = new JEditorPane();
text.setPreferredSize(new Dimension(400, 500));
JScrollPane scroller = new JScrollPane(text);
scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
panel.add(scroller);
JScrollPane grundscroller = new JScrollPane(panel);
grundscroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
grundscroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
grundpanel.add(grundscroller);
grundpanel.setLayout(new BorderLayout());
grundpanel.add(BorderLayout.CENTER, panel);
grundpanel.add(BorderLayout.NORTH, label);
frame.add(grundpanel);
frame.setSize(750, 750);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

Zuletzt bearbeitet: