• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Optimization algorithm

 
Dmitriy Logov
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


When I press the button "accept" the table is not updated. I use updateUI. But when more than 1000 lines updated 30 times per second - this method is not suitable. Are there ways to optimize?
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calling updateUI() is a mistake. That method is to be called after changing the Look&Feel.

There's too much code there that's unrelated to the stated problem. To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example.

edit But I do see that your TableModel implementation doesn't seem to be firing any updates. Fixing that iwll probably solve your problem.
 
Dmitriy Logov
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke, сan you give some examples or help to fix my code?
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through the source of AbstractTableModel and DefaultTableModel for inspiration.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic