moinsen, ich versuche eine Scrollbar in mein jEditorPane einzubauen, aber irgendwie will es nicht so richtig da ich mich bisher auch zu wenig mit Panes etc ausseinandergesetzt habe:
jemand rat?
Das ScrollPane wird in dem jEditorPane angezeigt obwohl die beiden ja irgendwie zusammenarbeiten müssten :\
Code:
jPanel1 = new javax.swing.JEditorPane();
JScrollPane scroll = new JScrollPane(jPanel1,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
Code:
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().add(scroll);
getContentPane().setLayout(layout);
getContentPane().setBackground(c);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnSelectAll)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnCancelSelect)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnUpload))
.addComponent(scroll, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jemand rat?
Das ScrollPane wird in dem jEditorPane angezeigt obwohl die beiden ja irgendwie zusammenarbeiten müssten :\