什么是 Java 混合 - Applet + 应用程序? [英] What's Java Hybrid - Applet + Application?

查看:41
本文介绍了什么是 Java 混合 - Applet + 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该怎么写?

从评论到我的回复,如下:

我们过去拥有的东西 - Applet 和应用程序 - 不再可用."

"What we had in the old days - An Applet and Application - is not available anymore."

反驳:

垃圾.它 [An Applet and Application] 被称为混合体,并且活得很好.如果您需要澄清,请单独提问.

Rubbish. It [An Applet and Application] is called an hybrid, and is alive and well. Ask on a separate question if you would like clarification.

我想问这个Java Hybrid是什么?

我已经搜索过,但由于某种原因无法找到任何关于活得很好"的有用信息.我使用的关键字可能略有偏差,所以这可能是一个原因.

I have searched but for some reason can't find any useful information for something that is "alive and well". The keywords I used maybe slightly off so that could be a reason.

推荐答案

hybrid 小程序/应用程序只是抽象了 两个顶级容器JFrameJApplet.示例见此处这里这里.

A hybrid applet/application simply abstracts the initialization of two top-level containers, JFrame and JApplet. Examples are seen here, here and here.

附录:它是如何工作的?

  • 第一个示例公开了一个工厂方法 createGUI(),并添加了将面板返回到现有的顶级容器.
  • second 提供了一个静态的 initContainer()方法,将封闭的顶级容器作为参数传递.
  • 第三 创建了一个 class Hybrid 具有静态 fireup() 方法和 WindowListener> 用于错误报告.
  • The first example exposes a factory method, createGUI(), and it adds the returned panel to the extant top-level container.
  • The second provides a static initContainer() method, passing the enclosing top-level container as a parameter.
  • The third creates a class Hybrid that has a static fireup() method and a WindowListener for error reporting.

这篇关于什么是 Java 混合 - Applet + 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆