Guest User

Untitled

a guest
May 11th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Why is JTable scrolling taking so much memory?
  2. @Override
  3. public void run() {
  4. while (true) {
  5. jScrollPane1.repaint();
  6. jScrollPane2.repaint();
  7. try {
  8. this.sleep(10);
  9. } catch (InterruptedException ex) {
  10. ex.printStackTrace();
  11. }
  12. }
  13. }
  14.  
  15. @Override
  16. public void run() {
  17. while (true) {
  18. aLabel.setText("Memory consumption: " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory());
  19. try {
  20. this.sleep(200);
  21. } catch (InterruptedException ex) {
  22. ex.printStackTrace();
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment