Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: AWT
Expertise: Beginner
Sep 15, 1998



Application Security Testing: An Integral Part of DevOps

Saving Panels with TextField?

I am writing a presentation application and want to take a Panel and add TextFields and maybe Images to it. Is it possible to save this Panel with TextFields on it to disk and reload it later without losing the size and the text of the TextFields?

As long as all the components you add implement the Serializable interface and save their complete state, you should be able to save and restore your panel without losing its dimensions or contents. All of the basic components provided in the java.awt package as well as the com.sun.java.swing package are serializable. You just have to make sure that any new components you create are also serializable.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date