Hi,
wie kann ich das JScrollPane immer ganz unten ausrichten?
Lg Chriss
wie kann ich das JScrollPane immer ganz unten ausrichten?
Lg Chriss
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
javax.swing.JScrollBar theBar = this.jScrollPane1.getVerticalScrollBar();
theBar.setValue(theBar.getMaximum());
SwingUtilities.invokeLater( new Runnable() {
public void run() { theBar.setValue(theBar.getMaximum()); } } );
SwingUtilities.invokeLater( new Runnable() {
public void run() { reiter1Pane.setValue(reiter1Pane.getMinimum()); } } );
reiter1Pane
public void ReloadTxtChat()
{
txtChat = new JTextPane();
jScrollPane1.setViewportView(txtChat);
txtChat.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
txtChat.setContentType("text/html");
txtChat.setEditable(false);
try
{
java.io.File filePath = new java.io.File(Main.DIR_DATA, strFilename);
java.net.URL urlPath = filePath.toURL();
txtChat.setPage(urlPath.toString());
}
catch(Exception e)
{
e.printStackTrace();
}
SwingUtilities.invokeLater( new Runnable()
{
public void run()
{
javax.swing.JScrollBar theBar = jScrollPane1.getVerticalScrollBar();
theBar.setValue(theBar.getMaximum());
System.out.println("Maximum"+theBar.getMaximum());
}
});
}
private JScrollPane getJScrollPane1()
{
if(jScrollPane1 == null)
{
jScrollPane1 = new JScrollPane();
{
txtChat = new JTextPane();
jScrollPane1.setViewportView(txtChat);
txtChat.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
txtChat.setContentType("text/html");
txtChat.setEditable(false);
}
}
return jScrollPane1;
}
getContentPane().add(getJScrollPane1(), new GridBagConstraints(1, 3, 6, 4, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));