java.applet.Applet Java Examples
The following examples show how to use
java.applet.Applet.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainPanel.java From javagame with MIT License | 6 votes |
public MainPanel() { // �p�l���̐����T�C�Y��ݒ� setPreferredSize(new Dimension(WIDTH, HEIGHT)); // ���R���C�A�E�g setLayout(null); meganteButton = new JButton("���K���e"); meganteButton.addActionListener(this); add(meganteButton); meganteButton.setBounds(10, 10, 100, 30); revivalButton = new JButton("�U�I���N"); revivalButton.addActionListener(this); add(revivalButton); revivalButton.setBounds(120, 10, 100, 30); revivalButton.setEnabled(false); // �C���[�W�����[�h���� loadImage("suraimu.gif"); // �T�E���h�����[�h spellClip = Applet.newAudioClip(getClass().getResource("spell.wav")); // �C���[�W����j�Ђ��쐬 init(image); }
Example #2
Source File: ORB.java From Java8CN with Apache License 2.0 | 6 votes |
/** * Creates a new <code>ORB</code> instance for an applet. This * method may be called from applets only and returns a new * fully-functional <code>ORB</code> object each time it is called. * @param app the applet; may be <code>null</code> * @param props applet-specific properties; may be <code>null</code> * @return the newly-created ORB instance */ public static ORB init(Applet app, Properties props) { String className; ORB orb; className = app.getParameter(ORBClassKey); if (className == null && props != null) className = props.getProperty(ORBClassKey); if (className == null) className = getSystemProperty(ORBClassKey); if (className == null) className = getPropertyFromFile(ORBClassKey); if ((className == null) || (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { orb = new com.sun.corba.se.impl.orb.ORBImpl(); } else { orb = create_impl(className); } orb.set_parameters(app, props); return orb; }
Example #3
Source File: AppletLauncher.java From fabric-loader with Apache License 2.0 | 5 votes |
public void replace(Applet applet) { this.mcApplet = applet; init(); if (active) { start(); validate(); } }
Example #4
Source File: Beans.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
BeansAppletStub(Applet target, AppletContext context, URL codeBase, URL docBase) { this.target = target; this.context = context; this.codeBase = codeBase; this.docBase = docBase; }
Example #5
Source File: Beans.java From hottub with GNU General Public License v2.0 | 5 votes |
BeansAppletStub(Applet target, AppletContext context, URL codeBase, URL docBase) { this.target = target; this.context = context; this.codeBase = codeBase; this.docBase = docBase; }
Example #6
Source File: DataCollectorFactory.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static DataCollector create( Applet app, Properties props, String localHostName ) { String appletHost = localHostName ; if (app != null) { URL appletCodeBase = app.getCodeBase() ; if (appletCodeBase != null) appletHost = appletCodeBase.getHost() ; } return new AppletDataCollector( app, props, localHostName, appletHost ) ; }
Example #7
Source File: DataCollectorFactory.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static DataCollector create( Applet app, Properties props, String localHostName ) { String appletHost = localHostName ; if (app != null) { URL appletCodeBase = app.getCodeBase() ; if (appletCodeBase != null) appletHost = appletCodeBase.getHost() ; } return new AppletDataCollector( app, props, localHostName, appletHost ) ; }
Example #8
Source File: ORBImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
protected void set_parameters(Applet app, Properties props) { preInit( null, props ) ; DataCollector dataCollector = DataCollectorFactory.create( app, props, getLocalHostName() ) ; postInit( null, dataCollector ) ; }
Example #9
Source File: OutgoingCall.java From Spark with Apache License 2.0 | 5 votes |
/** * Creates a new instance of OutgoingCall. */ public OutgoingCall() { try { ringing = Applet.newAudioClip(JinglePhoneRes.getURL("RINGING")); } catch (Exception e) { Log.error(e); } setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); cancelButton.setText(Res.getString("cancel")); add(cancelButton, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 11)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); }
Example #10
Source File: Resource.java From osp with GNU General Public License v3.0 | 5 votes |
/** * Gets an AudioClip. * * @return the audio clip */ public AudioClip getAudioClip() { if((clip==null)&&(getURL()!=null)) { clip = Applet.newAudioClip(getURL()); } return clip; }
Example #11
Source File: BasicPopupMenuUI.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
boolean isInPopup(Component src) { for (Component c=src; c!=null; c=c.getParent()) { if (c instanceof Applet || c instanceof Window) { break; } else if (c instanceof JPopupMenu) { return true; } } return false; }
Example #12
Source File: DataCollectorFactory.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static DataCollector create( Applet app, Properties props, String localHostName ) { String appletHost = localHostName ; if (app != null) { URL appletCodeBase = app.getCodeBase() ; if (appletCodeBase != null) appletHost = appletCodeBase.getHost() ; } return new AppletDataCollector( app, props, localHostName, appletHost ) ; }
Example #13
Source File: Beans.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
BeansAppletStub(Applet target, AppletContext context, URL codeBase, URL docBase) { this.target = target; this.context = context; this.codeBase = codeBase; this.docBase = docBase; }
Example #14
Source File: TestAppletConfiguration.java From commons-configuration with Apache License 2.0 | 5 votes |
/** * Initializes the tests. This implementation checks whether an applet can * be used. Some environments, which do not support a GUI, don't allow * creating an {@code Applet} instance. If we are in such an * environment, some tests need to behave differently or be completely * dropped. */ @Before public void setUp() throws Exception { try { new Applet(); supportsApplet = true; } catch (final Exception ex) { // cannot use applets supportsApplet = false; } }
Example #15
Source File: Wizard.java From javagame with MIT License | 5 votes |
public Wizard(MainPanel panel) { this.panel = panel; // �C���[�W�����[�h try { wizardImg = ImageIO.read(getClass().getResource("wizard.gif")); } catch (IOException e) { e.printStackTrace(); } // �T�E���h�����[�h spellClip = Applet.newAudioClip(getClass().getResource("spell.wav")); }
Example #16
Source File: SpreadSheet.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public InputField(String initValue, Applet app, int width, int height, Color bgColor, Color fgColor) { this.width = width; this.height = height; this.bgColor = bgColor; this.fgColor = fgColor; this.app = app; buffer = new char[maxchars]; nChars = 0; if (initValue != null) { initValue.getChars(0, initValue.length(), this.buffer, 0); nChars = initValue.length(); } sval = initValue; }
Example #17
Source File: LauncherComponent.java From mclauncher-api with MIT License | 5 votes |
public void createApplet() { try { this.minecraft = ((Applet) this.loader.loadClass("net.minecraft.client.MinecraftApplet").newInstance()); this.minecraft.setStub(this); } catch (Exception e) { e.printStackTrace(); } }
Example #18
Source File: BasicPopupMenuUI.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
boolean isInPopup(Component src) { for (Component c=src; c!=null; c=c.getParent()) { if (c instanceof Applet || c instanceof Window) { break; } else if (c instanceof JPopupMenu) { return true; } } return false; }
Example #19
Source File: BasicPopupMenuUI.java From Bytecoder with Apache License 2.0 | 5 votes |
@SuppressWarnings("deprecation") boolean isInPopup(Component src) { for (Component c=src; c!=null; c=c.getParent()) { if (c instanceof Applet || c instanceof Window) { break; } else if (c instanceof JPopupMenu) { return true; } } return false; }
Example #20
Source File: BasicPopupMenuUI.java From JDKSourceCode1.8 with MIT License | 5 votes |
boolean isInPopup(Component src) { for (Component c=src; c!=null; c=c.getParent()) { if (c instanceof Applet || c instanceof Window) { break; } else if (c instanceof JPopupMenu) { return true; } } return false; }
Example #21
Source File: ORBImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
protected void set_parameters(Applet app, Properties props) { preInit( null, props ) ; DataCollector dataCollector = DataCollectorFactory.create( app, props, getLocalHostName() ) ; postInit( null, dataCollector ) ; }
Example #22
Source File: DataCollectorFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static DataCollector create( Applet app, Properties props, String localHostName ) { String appletHost = localHostName ; if (app != null) { URL appletCodeBase = app.getCodeBase() ; if (appletCodeBase != null) appletHost = appletCodeBase.getHost() ; } return new AppletDataCollector( app, props, localHostName, appletHost ) ; }
Example #23
Source File: ClientLoader.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
private Applet loadClient(RSConfig config, ClassLoader classLoader) throws ClassNotFoundException, IllegalAccessException, InstantiationException { String initialClass = config.getInitialClass(); Class<?> clientClass = classLoader.loadClass(initialClass); Applet rs = (Applet) clientClass.newInstance(); rs.setStub(new RSAppletStub(config)); if (rs instanceof Client) { log.info("client-patch {}", ((Client) rs).getBuildID()); } return rs; }
Example #24
Source File: TextInput.java From openbd-core with GNU General Public License v3.0 | 5 votes |
public TextInput(String _formName, String _objectName, Applet _parent){ field = new TextField(); setBackCol( Color.white ); win = JSObject.getWindow(_parent); field.addKeyListener( this ); formName = _formName; objectName = _objectName; }
Example #25
Source File: Accelerator.java From javagame with MIT License | 4 votes |
public Accelerator(double x, double y, String fileName, Map map) { super(x, y, fileName, map); // �T�E���h�����[�h sound = Applet.newAudioClip(getClass().getResource("se/chari13_c.wav")); }
Example #26
Source File: ORBSingleton.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected void set_parameters(Applet app, Properties props) { }
Example #27
Source File: RegexpFilterTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) { Applet a = new RegexpFilterTest(); a.init(); a.start(); }
Example #28
Source File: Beans.java From JDKSourceCode1.8 with MIT License | 4 votes |
public Applet getApplet(String name) { return null; }
Example #29
Source File: Coin.java From javagame with MIT License | 4 votes |
public Coin(double x, double y, String fileName, Map map) { super(x, y, fileName, map); // �T�E���h�����[�h sound = Applet.newAudioClip(getClass().getResource("se/coin03.wav")); }
Example #30
Source File: FileDialogReturnTest.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) { Applet a = new FileDialogReturnTest(); a.init(); a.start(); }