Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populate jTable with JDBC database data using search button?

 
Vic Alfieri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

As part of my class in Java we have to create a GUI program that is an updateable, searchable, guestbook application using the Netbeans IDE and it has to have a MainFrame a SearchFrame an UpdateFrame and a RemoveUserFrame, this project is due next week and I need to get it to work, I have included a link to the search frame and mainframe code:
http://stackoverflow.com/questions/26984819/jdbc-to-jtable-output-query-regarding-making-buttons-work-in-gui-editor-for-netb

I need to know how to set up a RemoveUserFrame and how to make it so that clicking the search button will connect to the database and populate the jtable.

I have used google to attempt to find out how to make the frames work properly, but i'm either not using the right search terms or the help offered is close to what i need but not close enough that it helps.

I really hope someone can help here as it feels like i'm going crazy trying to find an answer.

Thanks in advance for any help offered.
 
Swastik Dey
Rancher
Posts: 1639
6
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should probably break up the things in three different layers. First layer/part (UI layer) will hold the User interfaces (in your term the different frames). The second layer is the model layer that holds the data and the third layer is the data access layer, that is used for database connectivity.
 
Vic Alfieri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swastik,

this doesn't help at all.

in Netbeans I have designed a GUI interface, I'm able to manipulate code for the individual buttons and other GUI elements, through Netbeans Design and Source modes, so basically what it does is allow me to drag and drop the elements (text fields, buttons, etc) into a frame and use it to set up the GUI interface i need for the program. I need to know how to make the search button search the database. If you can help with that then great, i also need to know how to make it so i can use GUI elements to remove user information from the database.

thanks for your suggestion, but it just wasn't what i needed right now, i need to know if there's something i'm missing such as where the data is pulled from or such, not a suggestion to separate the 'layers'.

The code in my link is from GUI elements and manipulated code for the button actions.

I'm asking for help with Netbeans, if you haven't used that program then your help is not helping.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic