Source Code : XMLEncoder a bean
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
XMLEncoder a bean
import java.beans.XMLEncoder;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import javax.swing.JFrame;
public class MainClass {
public static void main(String args[]) {
JFrame x = new JFrame("Look at me");
x.setSize(200, 300);
x.setVisible(true);
x.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FileOutputStream f;
try {
f = new FileOutputStream("Test.xml");
XMLEncoder e = new XMLEncoder(new BufferedOutputStream(f));
e.writeObject(x);
e.close();
} catch (Exception e) {
}
}
}
Thank with us