MetalworksDocumentFramepublic class MetalworksDocumentFrame extends JInternalFrame This is a subclass of JInternalFrame which displays documents. |
Fields Summary |
---|
static int | openFrameCount | static final int | offset |
Constructors Summary |
---|
public MetalworksDocumentFrame()
super("", true, true, true, true);
openFrameCount++;
setTitle("Untitled Message " + openFrameCount);
JPanel top = new JPanel();
top.setBorder(new EmptyBorder(10, 10, 10, 10));
top.setLayout(new BorderLayout());
top.add(buildAddressPanel(), BorderLayout.NORTH);
JTextArea content = new JTextArea( 15, 30 );
content.setBorder( new EmptyBorder(0,5 ,0, 5) );
content.setLineWrap(true);
JScrollPane textScroller = new JScrollPane(content,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
top.add( textScroller, BorderLayout.CENTER);
setContentPane(top);
pack();
setLocation( offset * openFrameCount, offset *openFrameCount);
|
Methods Summary |
---|
private javax.swing.JPanel | buildAddressPanel()
JPanel p = new JPanel();
p.setLayout( new LabeledPairLayout() );
JLabel toLabel = new JLabel("To: ", JLabel.RIGHT);
JTextField toField = new JTextField(25);
p.add(toLabel, "label");
p.add(toField, "field");
JLabel subLabel = new JLabel("Subj: ", JLabel.RIGHT);
JTextField subField = new JTextField(25);
p.add(subLabel, "label");
p.add(subField, "field");
JLabel ccLabel = new JLabel("cc: ", JLabel.RIGHT);
JTextField ccField = new JTextField(25);
p.add(ccLabel, "label");
p.add(ccField, "field");
return p;
|
|