/* A basic implementation of the JFrame class. */ package SesameGUI; import java.awt.*; import javax.swing.*; public class JFrameConsole extends javax.swing.JFrame { public JFrameConsole() { // This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment. //{{INIT_CONTROLS getContentPane().setLayout(null); setSize(614,363); setVisible(false); JButton1.setText("Close"); JButton1.setActionCommand("Close"); getContentPane().add(JButton1); JButton1.setBounds(492,324,96,24); getContentPane().add(textArea1); textArea1.setBounds(12,12,588,288); //}} //{{INIT_MENUS //}} //{{REGISTER_LISTENERS SymAction lSymAction = new SymAction(); JButton1.addActionListener(lSymAction); //}} } public JFrameConsole(String sTitle) { this(); setTitle(sTitle); } public void setVisible(boolean b) { if (b) setLocation(50, 50); super.setVisible(b); } static public void main(String args[]) { (new JFrameConsole()).setVisible(true); } public void addNotify() { // Record the size of the window prior to calling parents addNotify. Dimension size = getSize(); super.addNotify(); if (frameSizeAdjusted) return; frameSizeAdjusted = true; // Adjust size of frame according to the insets and menu bar Insets insets = getInsets(); javax.swing.JMenuBar menuBar = getRootPane().getJMenuBar(); int menuBarHeight = 0; if (menuBar != null) menuBarHeight = menuBar.getPreferredSize().height; setSize(insets.left + insets.right + size.width, insets.top + insets.bottom + size.height + menuBarHeight); } // Used by addNotify boolean frameSizeAdjusted = false; //{{DECLARE_CONTROLS javax.swing.JButton JButton1 = new javax.swing.JButton(); java.awt.TextArea textArea1 = new java.awt.TextArea(); //}} //{{DECLARE_MENUS //}} class SymAction implements java.awt.event.ActionListener { public void actionPerformed(java.awt.event.ActionEvent event) { Object object = event.getSource(); if (object == JButton1) JButton1_actionPerformed(event); } } void JButton1_actionPerformed(java.awt.event.ActionEvent event) { // close setVisible(false); } }