java - need noRepaint() when i validate() -


i have jscrollpane view. i'm doing chat application , it's why need have scrollbar maximum(). right maximum of view have validate before. when validate scrollpane automatic repaint doing. don't want repaint because makes double repaint when set scrollbar maximum : when scrollbar @ top , when bottom.

my code :

main.getwindow().getmainpanel().getscrollpanecenter().validate(); scrollpanecenter.getverticalscrollbar().setvalue(scrollpanecenter.getverticalscrollbar().getmaximum()); 

ps : want disable repaint of conponent or maybe have solution have reversed jscrollpane( have scrollbar bottom) .

i'm doing chat application

i'm guessing using a jtextarea or jtextpane.

it's why need have scrollbar maximum().

you don't need validate or set scrollbar manually. juat append text bottom of document. see text area scrolling couple of solutions.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -