• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get and Set val?  RSS feed

 
Rick Liberato
Ranch Hand
Posts: 104
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my class "TwoWaySerialComm" I constantly listen for new incoming phone call record data strings that I then parse and then immediately store this data to my Derby database for each such com port event.
Within this same class, code continues after this by reading from these saved records and posts back out to my jTable1 to show a "live" update of my last 10 call records.

My question is, I wish to break/split this portion of the code that does this "live" update posting back out to my jTable1 (so I can to perform a query search using this same jTable1 without the event driven updating over writing my query search results.) with two jButtons in my GUI builder in Netbeans. ie: a "Live" button and a "Query" button. The "Live" button setting  int varX = 1; and "Query" button setting varX = 0; .... when pressed.  These two buttons resided in my GUI class "MainDisplay"  The event driven com port data posting TO the database must be maintained at all times.

I believe I would need to "get" this varX in its current value(1 or 0) then test  with "if" then "else" .... but I cant see how compose this within my code.


 
Rick Liberato
Ranch Hand
Posts: 104
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I worked it out!  :  )





 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting the solution!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!