Results 1 to 1 of 1
- 12-29-2009, 01:35 PM #1Member
- Join Date
- Oct 2009
- Rep Power
Using JButtons for database navigation.
I'm sort of new to java and came across a problem i'm having using some jButtons as database navigation. I'm using 6 buttons Prev Record, Next Record, Enter Query, Execute Query, New Record and Save. I put these buttons on a toolbar which sits on my main jFrame. I have a jPanel on the main also. So I got these buttons to perform perfectly like I want them. I create a new jPanel and place it inside the jPanel on the main screen this new panel has fields which display data from my database. I've created references to the jButtons so they would navigate the records. Like I said works great. Now when I remove the jPanel from the main jPanel using mainPanel.remove(this), and do a repaint on the main screen. I wanted to put a different jpanel inside and navigate some other records this works but it also navigates the records from the panel I removed. So what I see happening is the references to the first panel are still there and garbage collection does not occur right away. Is there an easier way to use jbuttons as multifunction buttons with out creating new buttons for each panel i need to navigate records? Hope I make some sense here.
- By imrankhan in forum AWT / SwingReplies: 3Last Post: 03-19-2012, 12:25 PM
- By Srikala in forum JavaServer Faces (JSF)Replies: 1Last Post: 03-23-2009, 11:16 AM
- By shayz in forum Advanced JavaReplies: 3Last Post: 02-07-2009, 01:52 PM
- By stevedb in forum AWT / SwingReplies: 7Last Post: 04-01-2008, 01:23 PM
- By anthony417 in forum Advanced JavaReplies: 1Last Post: 07-26-2007, 08:40 PM