home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 July & August
/
Pcwk78a98.iso
/
Internet
/
Javadraw
/
DATA.Z
/
bc.pre
< prev
next >
Wrap
Text File
|
1997-03-04
|
2KB
|
88 lines
import java.awt.event.*;
import java.awt.image.*;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.net.URL;
public class \Name\ extends Container implements Runnable
{
private int beanVersion = 0;
private int minimumWidth = 150;
private int minimumHeight = 100;
private java.awt.Color bgColor = java.awt.Color.white;
public \Name\()
{
init();
}
public void init()
{
initListeners();
super.setBackground (bgColor);
}
private void initListeners()
{
}
public void start(ActionEvent x)
{
}
public void stop(ActionEvent x)
{
}
public void paint(Graphics g)
{
super.paint (g);
}
public Dimension minimumSize()
{
return new Dimension(minimumWidth, minimumHeight);
}
public Dimension preferredSize()
{
return minimumSize();
}
public void run()
{
}
// ************ Properties *************
public synchronized void setEnabled(boolean x)
{
super.setEnabled(x);
notify();
}
//insert properties get and set methods here.
// ************ Serialization *************
private void writeObject(ObjectOutputStream s) throws IOException
{
s.writeInt (beanVersion);
//write all necessary properties.
}
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException
{
if (s.readInt() != beanVersion)
{
throw new IOException("\Name\.readObject: version mismatch.");
}
//read your properties in the same order they've been written.
init();
}
}