aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes problem in erasing panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 21
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
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
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: 21
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: 2200
    
    7
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: 21
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in erasing panel