0
多くの行のテキストをjTextAreaに入力すると、バーが消えてスクロールします。 (そのバーがなくても、上下にスクロールできますが、それがなければ厄介です)jTextAreaが大きくなりすぎると、jScrollPaneのバーが消える
さらにいくつかの行は、行が増えたために実際には小さくなった後、行を追加するとある時点で消えてしまいます。
どうすればこの問題を解決できますか?
public static void main(String args[]) {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainFrame().setVisible(true);
}
});
}
あなたもスライダーを変更します、他のテーマの一つにニンバスを変更することにより:私が見つけ
私が探していたものではありませんでしたが、これはトリックでした。レイアウトを変更することもできます –