Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing Class  RSS feed

 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have written the GUI code in a class. And in another class i have written the code for displaying the database table. Both the classes give the output
correctly. But what i wand is to display that table in the GUI which consists of an empty panel. Can any body give me some ideas to how to combine this
NOTE: Both are in different classes.
 
Campbell Ritchie
Marshal
Posts: 55680
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can never rememeber how tables work, but you pass a reference from the model class to the display class and then use the database details to set up a table model. See whether these Java Tutorial pages help: 1. 2.

That is correct division of labour where one class provides the model (the data) and the other the view (the display).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!