本文整理汇总了Java中javax.swing.JApplet.start方法的典型用法代码示例。如果您正苦于以下问题:Java JApplet.start方法的具体用法?Java JApplet.start怎么用?Java JApplet.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JApplet
的用法示例。
在下文中一共展示了JApplet.start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import javax.swing.JApplet; //导入方法依赖的package包/类
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
JApplet applet = new DVSActApplet();
JFrame frame = new ActivityMonitorTest(applet);
applet.init();
applet.start();
frame.setVisible(true);
}
示例2: main
import javax.swing.JApplet; //导入方法依赖的package包/类
/**
* For testing in JFrame
* @param args the command line arguments
*/
public static void main(String args[]) {
JApplet applet = new ClockApplet();
JFrame frame = new ActivityMonitorTest(applet);
applet.init();
applet.start();
frame.setVisible(true);
}
示例3: main
import javax.swing.JApplet; //导入方法依赖的package包/类
/**
* For testing in JFrame
* @param args the command line arguments
*/
public static void main(String args[]) {
JApplet applet = new DVSActApplet();
JFrame frame = new ActivityMonitorTest(applet);
frame.setVisible(true);
applet.init();
applet.start();
}
示例4: run
import javax.swing.JApplet; //导入方法依赖的package包/类
public static void run(JApplet applet, int width, int height) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(applet);
frame.setSize(width, height);
applet.init();
applet.start();
frame.setVisible(true);
}
示例5: main
import javax.swing.JApplet; //导入方法依赖的package包/类
/**
* Start this as a Java applet.
*
* @param argv not used
*/
static public void main (String argv[]) {
JApplet applet = new BlackScholesOptionCalculator();
JFrame frame = new JFrame("BlackScholesOptionCalculator"); // create graphics frame
frame.getContentPane().add(applet); // add the applet
frame.setSize(500,300);
applet.init(); // initialise applet
applet.start();
frame.setVisible(true);
}
示例6: main
import javax.swing.JApplet; //导入方法依赖的package包/类
/**
* Run test applet.
*
* @param args command line parameters
*/
public static void main(String[] args)
{
JApplet applet = new JApplet() {
private static final long serialVersionUID = 1L;
@Override
public void init()
{
setLayout(new GridBagLayout());
WheelswitchDemo wst = new WheelswitchDemo();
GridBagConstraints consContent = new GridBagConstraints();
consContent.gridx = 0;
consContent.gridy = 1;
consContent.gridwidth = 0;
consContent.fill = java.awt.GridBagConstraints.BOTH;
consContent.anchor = GridBagConstraints.CENTER;
consContent.weightx = 1.0;
consContent.weighty = 1.0;
consContent.insets = new java.awt.Insets(11, 11, 11, 11);
add(wst.initializeContentPanel(), consContent);
ScrollPane helpTextScrollPane = new ScrollPane();
helpTextScrollPane.add(wst.getHelpTextArea());
GridBagConstraints consHelp = new GridBagConstraints();
consHelp.gridx = 0;
consHelp.gridy = 2;
consHelp.gridwidth = 0;
consHelp.fill = java.awt.GridBagConstraints.HORIZONTAL;
consHelp.anchor = GridBagConstraints.CENTER;
consHelp.weightx = 1.0;
consHelp.weighty = 0.0;
consHelp.insets = new java.awt.Insets(0, 11, 11, 11);
add(helpTextScrollPane, consHelp);
}
};
JFrame frame = new JFrame("Wheelswitch Testing Applet");
frame.getContentPane().add(applet);
frame.setSize(500, 400);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
applet.init();
applet.start();
frame.setVisible(true);
}