The moose likes Swing / AWT / SWT / JFace and the fly likes problem in erasing panel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "problem in erasing panel" Watch "problem in erasing panel" New topic
Author

problem in erasing panel

sagar khana
Greenhorn

Joined: Jan 15, 2012
Posts: 15
hey i am new in java n getting this problem

i want to create a program in which i am retrieving data from database and showing in gui frame but i want when submit pressed old frame's data should be get erased but instead of that it appends in that

thank you for your help


Michael Dunn
Rancher

Joined: Jun 09, 2003
Posts: 4041
Instead of disposing/recreating everything,
just change the text of the question label
and the four answer radiobuttons
sagar khana
Greenhorn

Joined: Jan 15, 2012
Posts: 15
Michael Dunn wrote:Instead of disposing/recreating everything,
just change the text of the question label
and the four answer radiobuttons


that is changed every time i press submit

but still old data are still in panel didnt erased out
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1652
Your launch() method should NOT create components.

It should do the database query and then update existing components on the frame by using setText(), setModel() or whatever method is used to change the data in an existing component.
sagar khana
Greenhorn

Joined: Jan 15, 2012
Posts: 15
Rob Camick wrote:Your launch() method should NOT create components.

It should do the database query and then update existing components on the frame by using setText(), setModel() or whatever method is used to change the data in an existing component.


i make different function and it works thank you
 
 
subject: problem in erasing panel
 
Threads others viewed
Adding Record Problem in JDBC ?
Can't Update Record ?
Getting a problem while using database connectivity
Can't Update Record ?
getText() is not working?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture