How to clear the JFrame or JPanel? -


i planing develop quiz program in jframe , after first question want display second question , should clear first question display second question, in c know clrscr(); in java don' know 1 can me ?

you should call

getcontentpane().removeall(); 

removeall() has not been overridden add() or remove() forward contentpane necessary.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -