home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Sample.bin
/
SimpleFrame.java
< prev
next >
Wrap
Text File
|
1998-09-28
|
2KB
|
78 lines
/*
A GUI version of the SimpleExampmle example from Sun that shows off the different
looks & feels. It uses a sublclass of JLookAndFeelComboBox instead of radio buttons.
*/
import com.sun.java.swing.*;
import java.awt.*;
import com.symantec.itools.swing.JLookAndFeelComboBox;
public class SimpleFrame extends com.sun.java.swing.JFrame
{
public SimpleFrame()
{
// 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
setTitle("");
getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
getContentPane().setFont(new Font("Dialog", Font.PLAIN, 0));
setSize(333,50);
setVisible(false);
JButton1.setText("Hello, world!");
JButton1.setActionCommand("Hello, world!");
JButton1.setMnemonic((int)'H');
getContentPane().add(JButton1);
JButton1.setBounds(69,5,103,25);
JLookAndFeelAndPackFrameComboBox1.setRequestFocusEnabled(false);
getContentPane().add(JLookAndFeelAndPackFrameComboBox1);
JLookAndFeelAndPackFrameComboBox1.setBounds(177,5,86,24);
JLookAndFeelAndPackFrameComboBox1.setSelectedIndex(0);
//}}
pack();
//{{INIT_MENUS
//}}
//{{REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow();
this.addWindowListener(aSymWindow);
//}}
}
static public void main(String args[])
{
SimpleFrame sf = new SimpleFrame();
sf.setLocation(50, 50);
sf.setVisible(true);
}
//{{DECLARE_CONTROLS
com.sun.java.swing.JButton JButton1 = new com.sun.java.swing.JButton();
JLookAndFeelAndPackFrameComboBox JLookAndFeelAndPackFrameComboBox1 = new JLookAndFeelAndPackFrameComboBox();
//}}
//{{DECLARE_MENUS
//}}
class SymWindow extends java.awt.event.WindowAdapter
{
public void windowClosing(java.awt.event.WindowEvent event)
{
Object object = event.getSource();
if (object == SimpleFrame.this)
SimpleFrame_windowClosing(event);
}
}
void SimpleFrame_windowClosing(java.awt.event.WindowEvent event)
{
System.exit(0);
}
}