English 中文(简体)
为什么进口 j。 页: 1 * E/CN.6/2009/1。
原标题:Why import javax.swing.* instead of java.swing.*

我不理解为什么在少数进口包中,“java”后面加上“x”。 原因何在? Can t it is only java.swing.* 同其他人一样:java.io.*?

最佳回答

Swing最初是延伸至Java,这是一个可单独下载的图书馆。 它成为 Java1.2的“主要”法律的一部分。 单设一个图书馆声称一套 j瓦* 包裹是奇怪的,因此目前的情况。 还有一些类似的延伸。

Wikipedia article on Swing,对其历史有比更多的信息。

问题回答

From Core Java 2:
alt text http://bks5.books.google.fr/books?id=W6bomXWB-TYC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U3IeRSfENUVokGf-d9GUZZBU-tYMQ

姓名<代码>javax表示 Java延包,不是核心包裹。 滚动班实际上延伸到 Java1.1。 由于上课不属于核心等级,因此有可能将上课装成 Java1.1-相容的浏览器。 在 Java2平台上,Swaing一揽子计划不再是延伸,而是核心等级的一部分。 任何与Java 2相容的Java方案都必须提供Swaing课程。 然而,与Java1.1号法典相容的javax名称仍然存在。 (实际上,Swaing包装开始作为com.sun.java.swing,然后短暂移至java.awt.swing。 早期 Java 2个贝塔版本,随后在 Java 2个贝塔版本中回过com.sun.java.swing,在 Java 2个贝塔版本中,在 Java方案家的抗议灯后,在javax.swing上找到了最后的休息地点。

由于历史原因和落后的兼容性。 在java 1.2的左翼被分配为一个单独的包裹,从java(延伸到Hence javax)。

当缝.成为标准java分配包裹的一部分时,会因落后的兼容性而保持沉默。 More info in wikipedia 。 条款

<>x是因为它们是延伸。 在java第1.1版中,没有wing,在添加后,他们决定将其命名为:javax

有一些类似的包裹。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签