2016-06-29 9 views
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); 
      } 
     }); 


} 

あなたもスライダーを変更します、他のテーマの一つにニンバスを変更することにより:私が見つけ

答えて

1

最善の解決策は、あなたのLook and Feel 標準は次のようになります。変更されました。

+0

私が探していたものではありませんでしたが、これはトリックでした。レイアウトを変更することもできます –

関連する問題