A
Azenth
Gast
Hallo,
ich habe ein kleines Problem...
ich möchte das mein JTextPane ein Scrollbalken bekommt, jedoch schaffe ich es nicht diese einzubinden und ich weiß nicht wieso das nicht geht...
Das hier ist mein Quelltext:
Ich hoffe ihr könnt mir da weiter helfen...
Viele Grüße
ich habe ein kleines Problem...
ich möchte das mein JTextPane ein Scrollbalken bekommt, jedoch schaffe ich es nicht diese einzubinden und ich weiß nicht wieso das nicht geht...
Das hier ist mein Quelltext:
Code:
this.tPane2 = new JTextPane();
this.tPane2.setContentType("text/html");
this.tPane2.setFont(new Font("Verdana", Font.BOLD, 12 ));
this.tPane2.setEditable(false);
this.tPane2.setSize(125, 165);
this.tPane2.setLocation(50, 75);
sb = new StringBuffer();
sb.append("<html><head>Auf Wiedersehen</head><body align='center'>\n");
sb.append("Ihre Eingabe: " + this.myEing + "
\n");
if(this.ort != null){
sb.append("Ort: \n" + this.ort + "
\n");
sb.append("Betrieb: \n" + this.betrieb + "
\n");
sb.append("<img href='Bild1'> </img>
\n");
sb.append("<img href='Bild2'> </img>
\n");
} else {
sb.append("Uns liegen keine Angaben vor!
\n");
}
sb.append("</body></html>\n");
this.tPane2.setText(sb.toString());
this.scrollpane = new JScrollPane();
this.scrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
this.tPane2.add(this.scrollpane);
Ich hoffe ihr könnt mir da weiter helfen...
Viele Grüße