类的用途
java.awt.Component
使用 Component 的包
包
描述
提供组成 Java 辅助功能实用程序的接口和类的集合。
提供创建 applet 所需的类以及 applet 用来与其 applet 上下文通信的类。
包含用于创建用户界面以及绘制图形和图像的所有类。
拖放是一种在许多图形用户界面系统中发现的直接操作手势,它提供了一种机制,可以在逻辑上与 GUI 中的表示元素相关联的两个实体之间传输信息。
提供用于处理 AWT 组件触发的不同类型事件的接口和类。
为输入方法框架提供类和接口。
包含与开发 beans 相关的类——基于 JavaBeans 体系结构的组件。
提供与 bean 上下文相关的类和接口。
提供一组“轻量级”(全 Java 语言)组件,尽可能在所有平台上以相同的方式工作。
提供用于在 Swing 组件周围绘制专用边框的类和接口。
包含
JColorChooser 组件使用的类和接口。
提供由 Swing 组件触发的事件。
提供一个接口和许多抽象类,Swing 使用这些抽象类来提供其可插入的外观功能。
提供根据基本外观构建的用户界面对象。
提供根据 Java 外观(曾经代号为 Metal )构建的用户界面对象,这是默认外观。
Synth 是一种可换肤的外观和感觉,其中所有绘画都是委托的。
提供用于处理
javax.swing.JTable 的类和接口。
提供处理可编辑和不可编辑文本组件的类和接口。
提供用于创建 HTML 文本编辑器的类
HTMLEditorKit 和支持类。
提供用于处理
javax.swing.JTree 的类和接口。
-
Component 在 com.sun.java.accessibility.util 中的用法
-
Component 在 java.applet 中的用法
java.applet 中 Component 的子类 -
Component 在 java.awt 中的用法
修饰符和类型类描述class此类创建一个带标签的按钮。classCanvas组件表示屏幕的空白矩形区域,应用程序可以在该区域上绘制,或者应用程序可以从该区域捕获用户的输入事件。class复选框是一个图形组件,可以处于“打开”(true) 或“关闭”(false) 状态。classChoice类提供了一个弹出式选择菜单。class通用抽象窗口工具包 (AWT) 容器对象是可以包含其他 AWT 组件的组件。class对话框是具有标题和边框的顶级窗口,通常用于从用户那里获取某种形式的输入。classFileDialog类显示一个对话窗口,用户可以从中选择文件。classFrame是带有标题和边框的顶级窗口。classLabel对象是用于在容器中放置文本的组件。classList组件向用户呈现一个滚动的文本项列表。classPanel是最简单的容器类。classScrollbar类包含一个滚动条,一个熟悉的用户界面对象。class为单个子组件实现自动水平和/或垂直滚动的容器类。classTextArea对象是显示文本的多行区域。classTextComponent类是任何允许编辑某些文本的组件的超类。classTextField对象是允许编辑单行文本的文本组件。classWindow对象是没有边框和菜单栏的顶级窗口。修饰符和类型Field描述protected Hashtable<Component,GridBagConstraints> GridBagLayout.comptable该哈希表维护组件与其 gridbag 约束之间的关联。修饰符和类型方法描述将指定的组件附加到此容器的末尾。将指定的组件添加到此容器的给定位置。将指定的组件添加到此容器。Container.findComponentAt(int x, int y) 定位包含指定位置的可见子组件。Container.findComponentAt(Point p) 定位包含指定点的可见子组件。Container.getComponent(int n) 获取此容器中的第 n 个组件。ContainerOrderFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。abstract ComponentFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。Component.getComponentAt(int x, int y) 确定此组件或其直接子组件之一是否包含 (x, y) 位置,如果是,则返回包含组件。Component.getComponentAt(Point p) 返回包含指定点的组件或子组件。Container.getComponentAt(int x, int y) 找到包含 x,y 位置的组件。Container.getComponentAt(Point p) 获取包含指定点的组件。ContainerOrderFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。abstract ComponentFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。Container.getComponents()获取此容器中的所有组件。ContainerOrderFocusTraversalPolicy.getDefaultComponent(Container aContainer) 返回要聚焦的默认组件。abstract ComponentFocusTraversalPolicy.getDefaultComponent(Container aContainer) 返回要聚焦的默认组件。ContainerOrderFocusTraversalPolicy.getFirstComponent(Container aContainer) 返回遍历循环中的第一个 Component。abstract ComponentFocusTraversalPolicy.getFirstComponent(Container aContainer) 返回遍历循环中的第一个 Component。KeyboardFocusManager.getFocusOwner()如果焦点所有者与调用线程处于同一上下文中,则返回焦点所有者。Window.getFocusOwner()如果此 Window 获得焦点,则返回此 Window 的具有焦点的子 Component;否则返回 null。protected ComponentKeyboardFocusManager.getGlobalFocusOwner()返回焦点所有者,即使调用线程与焦点所有者处于不同的上下文中也是如此。protected ComponentKeyboardFocusManager.getGlobalPermanentFocusOwner()返回永久焦点所有者,即使调用线程与永久焦点所有者处于不同的上下文中也是如此。FocusTraversalPolicy.getInitialComponent(Window window) 返回当 Window 第一次可见时应该接收焦点的 Component。ContainerOrderFocusTraversalPolicy.getLastComponent(Container aContainer) 返回遍历循环中的最后一个 Component。abstract ComponentFocusTraversalPolicy.getLastComponent(Container aContainer) 返回遍历循环中的最后一个 Component。BorderLayout.getLayoutComponent(Container target, Object constraints) 根据目标Container的组件方向返回对应于给定约束位置的组件。BorderLayout.getLayoutComponent(Object constraints) 获取使用给定约束添加的组件Window.getMostRecentFocusOwner()返回此 Window 的子组件,当此 Window 获得焦点时,它将接收焦点。KeyboardFocusManager.getPermanentFocusOwner()如果永久焦点所有者与调用线程处于同一上下文中,则返回永久焦点所有者。Component.locate(int x, int y) 已弃用。从 JDK 1.1 版开始,由 getComponentAt(int, int) 取代。Container.locate(int x, int y) 已弃用。从 JDK 1.1 版开始,由getComponentAt(int, int)取代。修饰符和类型方法描述protected boolean确定 Component 作为新的焦点所有者是否是可接受的选择。protected boolean确定 Component 作为新的焦点所有者是否是可接受的选择。将指定的组件附加到此容器的末尾。将指定的组件添加到此容器的给定位置。void将指定的组件添加到此容器的末尾。void在指定索引处使用指定约束将指定组件添加到此容器。将指定的组件添加到此容器。protected void将指定的组件添加到此容器的指定索引处。protected final void将指定的组件添加到此滚动窗格容器。voidBorderLayout.addLayoutComponent(Component comp, Object constraints) 使用指定的约束对象将指定的组件添加到布局中。voidBorderLayout.addLayoutComponent(String name, Component comp) 已弃用。替换为addLayoutComponent(Component, Object)。voidCardLayout.addLayoutComponent(Component comp, Object constraints) 将指定的组件添加到此卡片布局的内部名称表中。voidCardLayout.addLayoutComponent(String name, Component comp) 已弃用。替换为addLayoutComponent(Component, Object)。voidFlowLayout.addLayoutComponent(String name, Component comp) 将指定的组件添加到布局中。voidGridBagLayout.addLayoutComponent(Component comp, Object constraints) 使用指定的constraints对象将指定的组件添加到布局中。voidGridBagLayout.addLayoutComponent(String name, Component comp) 没有效果,因为这个布局管理器不使用每个组件的字符串。voidGridLayout.addLayoutComponent(String name, Component comp) 将具有指定名称的指定组件添加到布局中。voidLayoutManager.addLayoutComponent(String name, Component comp) 如果布局管理器使用每个组件字符串,则将组件comp添加到布局中,将其与name指定的字符串相关联。voidLayoutManager2.addLayoutComponent(Component comp, Object constraints) 使用指定的约束对象将指定的组件添加到布局中。<T extends DragGestureRecognizer>
TToolkit.createDragGestureRecognizer(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl) 创建请求的抽象 DragGestureRecognizer 类的具体的、平台相关的子类,并将其与指定的 DragSource、Component 和 DragGestureListener 相关联。protected voidDefaultKeyboardFocusManager.dequeueKeyEvents(long after, Component untilFocused) 释放所有因使用相同时间戳和组件调用enqueueKeyEvents而排队的 KeyEvent,以便正常分派给当前焦点所有者。protected abstract voidKeyboardFocusManager.dequeueKeyEvents(long after, Component untilFocused) 由 AWT 调用以通知 KeyboardFocusManager 它应该取消 KeyEvents 的延迟调度。protected voidDefaultKeyboardFocusManager.discardKeyEvents(Component comp) 丢弃所有因使用指定组件或其后代之一调用enqueueKeyEvents而排队的所有 KeyEvent。protected abstract voidKeyboardFocusManager.discardKeyEvents(Component comp) 由 AWT 调用以通知 KeyboardFocusManager 它应该取消 KeyEvents 的延迟调度。protected voidDefaultKeyboardFocusManager.enqueueKeyEvents(long after, Component untilFocused) 延迟 KeyEvent 的调度,直到指定的 Component 成为焦点所有者。protected abstract voidKeyboardFocusManager.enqueueKeyEvents(long after, Component untilFocused) 由 AWT 调用以通知 KeyboardFocusManager 它应该延迟调度 KeyEvents,直到指定的 Component 成为焦点所有者。voidDefaultKeyboardFocusManager.focusNextComponent(Component aComponent) 在 aComponent 之后聚焦 Component,通常基于 FocusTraversalPolicy。abstract voidKeyboardFocusManager.focusNextComponent(Component aComponent) 在 aComponent 之后聚焦 Component,通常基于 FocusTraversalPolicy。voidDefaultKeyboardFocusManager.focusPreviousComponent(Component aComponent) 在组件之前聚焦组件,通常基于 FocusTraversalPolicy。abstract voidKeyboardFocusManager.focusPreviousComponent(Component aComponent) 在组件之前聚焦组件,通常基于 FocusTraversalPolicy。ContainerOrderFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。abstract ComponentFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。ContainerOrderFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。abstract ComponentFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。intContainer.getComponentZOrder(Component comp) 返回容器内组件的 z 顺序索引。BorderLayout.getConstraints(Component comp) 获取指定组件的约束GridBagLayout.getConstraints(Component comp) 获取指定组件的约束。protected static ContainerToolkit.getNativeContainer(Component c) 在给定本机组件的情况下,让本机对等点能够查询本机容器(例如,直接父级可能是轻量级的)。booleanContainer.isAncestorOf(Component c) 检查组件是否包含在此容器的组件层次结构中。protected GridBagConstraintsGridBagLayout.lookupConstraints(Component comp) 检索指定组件的约束。voidDefaultKeyboardFocusManager.processKeyEvent(Component focusedComponent, KeyEvent e) 当且仅当 KeyEvent 表示指定 focusedComponent 的焦点遍历键时,此方法才启动焦点遍历操作。abstract voidKeyboardFocusManager.processKeyEvent(Component focusedComponent, KeyEvent e) 当且仅当 KeyEvent 表示指定 focusedComponent 的焦点遍历键时,此方法才启动焦点遍历操作。final voidKeyboardFocusManager.redispatchEvent(Component target, AWTEvent e) 以 AWT 事件分派器不会递归地请求 KeyboardFocusManager 或任何已安装的 KeyEventDispatchers 再次分派事件的方式重新分派 AWTEvent。void从此容器中移除指定的组件。voidBorderLayout.removeLayoutComponent(Component comp) 从此边框布局中移除指定的组件。voidCardLayout.removeLayoutComponent(Component comp) 从布局中移除指定的组件。voidFlowLayout.removeLayoutComponent(Component comp) 从布局中移除指定的组件。voidGridBagLayout.removeLayoutComponent(Component comp) 从此布局中移除指定的组件。voidGridLayout.removeLayoutComponent(Component comp) 从布局中移除指定的组件。voidLayoutManager.removeLayoutComponent(Component comp) 从布局中移除指定的组件。voidContainer.setComponentZOrder(Component comp, int index) 将指定组件移动到容器中指定的 z 顺序索引。voidGridBagLayout.setConstraints(Component comp, GridBagConstraints constraints) 设置此布局中指定组件的约束。protected voidKeyboardFocusManager.setGlobalFocusOwner(Component focusOwner) 设置焦点所有者。protected voidKeyboardFocusManager.setGlobalPermanentFocusOwner(Component permanentFocusOwner) 设置永久焦点所有者。voidWindow.setLocationRelativeTo(Component c) 根据以下场景设置窗口相对于指定组件的位置。void在相对于原点组件的 x、y 位置显示弹出菜单。voidDefaultKeyboardFocusManager.upFocusCycle(Component aComponent) 将焦点向上移动一个焦点遍历周期。abstract voidKeyboardFocusManager.upFocusCycle(Component aComponent) 将焦点向上移动一个焦点遍历周期。 -
Component 在 java.awt.dnd 中的用法
java.awt.dnd 中的字段声明为 Component修饰符和类型Field描述protected ComponentDragGestureRecognizer.component与此DragGestureRecognizer关联的Component。java.awt.dnd 中返回 Component 的方法修饰符和类型方法描述DragGestureEvent.getComponent()返回与此DragGestureEvent关联的Component。DragGestureRecognizer.getComponent()此方法返回Component将由DragGestureRecognizer“观察”以进行拖动启动手势。DragSourceContext.getComponent()返回与此DragSourceContext关联的Component。DropTarget.getComponent()获取与此DropTarget关联的Component。DropTargetContext.getComponent()此方法返回与此DropTargetContext关联的Component。java.awt.dnd 中的方法,参数类型为 Component修饰符和类型方法描述DragSource.createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) 创建一个新的DragGestureRecognizer为这个DragSource实现DragGestureRecognizer的默认抽象子类,并在新创建的对象上设置指定的Component和DragGestureListener。<T extends DragGestureRecognizer>
TDragSource.createDragGestureRecognizer(Class<T> recognizerAbstractClass, Component c, int actions, DragGestureListener dgl) 创建一个新的DragGestureRecognizer实现DragGestureRecognizer的指定抽象子类,并在新创建的对象上设置指定的Component和DragGestureListener。protected DropTarget.DropTargetAutoScrollerDropTarget.createDropTargetAutoScroller(Component c, Point p) 创建一个嵌入式自动滚动器voidDragGestureRecognizer.setComponent(Component c) 设置 DragGestureRecognizer 与 registerListeners() 相关联的组件,并且 unregisterListeners() 被调用为适当的副作用。voidDropTarget.setComponent(Component c) 注意:此接口需要以两种方式之一允许 DropTarget 与 Component 的安全关联:component.setDropTarget(droptarget);或droptarget.setComponent(component);java.awt.dnd 中的构造函数,参数类型为 Component修饰符构造方法描述protected给定要在此拖放操作中使用的DragSource构造一个新的DragGestureRecognizer,而Component这个DragGestureRecognizer应该“观察”拖动启动手势。protectedDragGestureRecognizer(DragSource ds, Component c, int sa) 构造一个新的DragGestureRecognizer,给定要在此拖放操作中使用的DragSource,Component这个DragGestureRecognizer应该“观察”拖动启动手势,以及此拖放操作支持的操作。protectedDragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl) 构造一个新的DragGestureRecognizer给定要在此拖放操作中使用的DragSource,Component这个DragGestureRecognizer应该“观察”拖动启动手势,此拖放操作支持的动作,以及DragGestureListener通知一次已检测到拖动启动手势。DropTarget(Component c, int ops, DropTargetListener dtl) 创建一个DropTarget,给定Component与自身关联,一个int表示要支持的默认可接受操作,以及一个DropTargetListener来处理事件处理。DropTarget(Component c, int ops, DropTargetListener dtl, boolean act) 创建一个DropTarget给定Component与自身关联,一个int表示要支持的默认可接受操作,一个DropTargetListener处理事件处理,以及一个boolean指示DropTarget当前是否正在接受丢弃。DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm) 创建一个新的 DropTarget,给定Component与自身关联,一个int表示要支持的默认可接受操作,一个DropTargetListener处理事件处理,一个boolean指示DropTarget当前是否正在接受丢弃,以及一个FlavorMap使用(或默认值FlavorMap为空)。DropTarget(Component c, DropTargetListener dtl) 创建一个DropTarget,给定Component与自身关联,以及DropTargetListener处理事件处理。protected构造一个 DropTargetAutoScrollerprotected给定Componentc 的DragSource和要观察的Component构造一个新的MouseDragGestureRecognizer。protectedMouseDragGestureRecognizer(DragSource ds, Component c, int act) 给定Componentc 的DragSource、要观察的Component以及此拖动操作允许的操作,构造一个新的MouseDragGestureRecognizer。protectedMouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl) 构造一个新的MouseDragGestureRecognizer,给定Componentc 的DragSource、要观察的Component、此拖动操作允许的动作以及检测到拖动手势时通知的DragGestureListener。 -
Component 在 java.awt.event 中的用法
java.awt.event 中返回 Component 的方法修饰符和类型方法描述HierarchyEvent.getChanged()返回已更改的层次结构顶部的组件。ContainerEvent.getChild()返回受事件影响的组件。ComponentEvent.getComponent()返回事件的发起者。HierarchyEvent.getComponent()返回事件的发起者。FocusEvent.getOppositeComponent()返回参与此焦点更改的其他 Component。java.awt.event 中的构造函数,参数类型为 Component修饰符构造方法描述ComponentEvent(Component source, int id) 构造一个ComponentEvent对象。ContainerEvent(Component source, int id, Component child) 构造一个ContainerEvent对象。FocusEvent(Component source, int id) 构造一个FocusEvent对象并将其标识为焦点的永久更改。FocusEvent(Component source, int id, boolean temporary) 构造一个FocusEvent对象并识别更改是否是临时的。FocusEvent(Component source, int id, boolean temporary, Component opposite) 构造一个具有指定临时状态的FocusEvent对象,与Component和Cause.UNKNOWN原因相对。FocusEvent(Component source, int id, boolean temporary, Component opposite, FocusEvent.Cause cause) 构造一个具有指定临时状态的FocusEvent对象,与Component和原因相反。HierarchyEvent(Component source, int id, Component changed, Container changedParent) 构造一个HierarchyEvent对象以识别Component层次结构中的更改。HierarchyEvent(Component source, int id, Component changed, Container changedParent, long changeFlags) 构造一个HierarchyEvent对象以识别Component层次结构中的更改。InputMethodEvent(Component source, int id, long when, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) 使用指定的源组件、类型、时间、文本、插入符号和 visiblePosition 构造一个InputMethodEvent。InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition) 使用指定的源组件、类型、插入符号和 visiblePosition 构造一个InputMethodEvent。InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) 使用指定的源组件、类型、文本、插入符号和 visiblePosition 构造一个InputMethodEvent。已弃用。从 JDK1.1 开始;使用KeyEvent(Component, int, long, int, int, char)代替构造一个KeyEvent对象。KeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, int keyLocation) 构造一个KeyEvent对象。MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) 使用指定的源组件、类型、修饰符、坐标、点击次数和 popupTrigger 标志构造一个MouseEvent对象。MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) 使用指定的源组件、类型、时间、修饰符、坐标、点击次数、popupTrigger 标志和按钮编号构造一个MouseEvent对象。MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int button) 使用指定的源组件、类型、时间、修饰符、坐标、绝对坐标、点击次数、popupTrigger 标志和按钮编号构造一个MouseEvent对象。MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation) 使用指定的源组件、类型、修饰符、坐标、滚动类型、滚动量和滚轮旋转构造一个MouseWheelEvent对象。MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation) 使用指定的源组件、类型、修饰符、坐标、绝对坐标、滚动类型、滚动量和滚轮旋转构造一个MouseWheelEvent对象。MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation, double preciseWheelRotation) 使用指定的源组件、类型、修饰符、坐标、绝对坐标、滚动类型、滚动量和滚轮旋转构造一个MouseWheelEvent对象。PaintEvent(Component source, int id, Rectangle updateRect) 构造具有指定源组件和类型的PaintEvent对象。 -
Component 在 java.awt.im 中的用法
java.awt.im 中的方法,参数类型为 Component修饰符和类型方法描述voidInputContext.removeNotify(Component client) 通知输入上下文客户端组件已从其包含层次结构中删除,或者该组件的输入方法支持已被禁用。 -
Component 在 java.beans 中的用法
java.beans 中返回 Component 的方法修饰符和类型方法描述PropertyEditor.getCustomEditor()PropertyEditor 可以选择提供一个完整的自定义组件来编辑其属性值。PropertyEditorSupport.getCustomEditor()PropertyEditor 可以选择提供一个完整的自定义组件来编辑其属性值。 -
Component 在 java.beans.beancontext 中的用法
java.beans.beancontext 中返回 Component 的方法修饰符和类型方法描述BeanContextChildComponentProxy.getComponent()获取与此BeanContextChild关联的java.awt.Component。 -
Component 在 javax.swing 中的用法
在 javax.swing 中具有类型参数为 Component 的类修饰符和类型类描述final classJLayer是 Swing 组件的通用装饰器,它使您能够实现各种高级绘画效果,并接收在其边界内生成的所有AWTEvent的通知。javax.swing 中 Component 的子类修饰符和类型类描述class定义按钮和菜单项的通用行为。class使用 BoxLayout 对象作为其布局管理器的轻量级容器。static class参与布局但没有视图的轻量级组件的实现。class此类插入在单元格渲染器和使用它们的组件之间。class呈现列表中的项目。static class实现 UIResource 的 DefaultListCellRenderer 的子类。class已弃用,将被删除:此 API 元素可能会在未来版本中删除。Applet API 已弃用,没有替代品。class“按下”按钮的实现。class复选框的实现——可以选择或取消选择的项目,并向用户显示其状态。class可以选择或取消选择的菜单项。classJColorChooser提供了一个控件面板,旨在允许用户操纵和选择颜色。classJComboBox<E>组合按钮或可编辑字段和下拉列表的组件。class除顶级容器外的所有 Swing 组件的基类。class用于创建多文档界面或虚拟桌面的容器。class用于创建对话窗口的主类。class用于编辑各种内容的文本组件。classJFileChooser为用户选择文件提供了一种简单的机制。classJFormattedTextFieldextendsJTextField添加对格式化任意值的支持,以及在用户编辑文本后检索特定对象。classjava.awt.Frame的扩展版本,增加了对 JFC/Swing 组件架构的支持。class一个轻量级对象,它提供了原生框架的许多功能,包括拖动、关闭、成为图标、调整大小、标题显示以及对菜单栏的支持。static class该组件代表JInternalFrame的图标化版本。class短文本字符串或图像或两者的显示区域。final classJLayer是 Swing 组件的通用装饰器,它使您能够实现各种高级绘画效果,并接收在其边界内生成的所有AWTEvent的通知。classJLayeredPane增加了 JFC/Swing 容器的深度,允许组件在需要时相互重叠。classJList<E>显示对象列表并允许用户选择一个或多个项目的组件。class菜单的实现——一个包含JMenuItem的弹出窗口,当用户在JMenuBar上选择一个项目时显示。class菜单栏的实现。class菜单中项目的实现。classJOptionPane可以很容易地弹出一个标准对话框,提示用户输入一个值或通知他们一些事情。classJPanel是一个通用的轻量级容器。classJPasswordField是一个轻量级组件,允许编辑单行文本,其中视图指示已键入内容,但不显示原始字符。class弹出菜单的实现——弹出并显示一系列选项的小窗口。static class特定于弹出菜单的分隔符。class可视化显示某些任务进度的组件。class单选按钮的实现——可以选择或取消选择的项目,并向用户显示其状态。class单选按钮菜单项的实现。classJFrame、JDialog、JWindow、JApplet和JInternalFrame在幕后使用的轻量级容器。class滚动条的实现。class提供轻量级组件的可滚动视图。protected class默认情况下,JScrollPane创建的滚动条是此类的实例。classJSeparator提供了一个用于实现分隔线的通用组件 - 最常用作菜单项之间的分隔线,将它们分解为逻辑分组。class允许用户通过在有界间隔内滑动旋钮以图形方式选择值的组件。class允许用户从有序序列中选择数字或对象值的单行输入字段。static class模型为SpinnerDateModel的JSpinner的编辑器。static class一个简单的基类,用于更专业的编辑器,它使用JFormattedTextField显示模型当前值的只读视图。static class模型为SpinnerListModel的JSpinner的编辑器。static class模型为SpinnerNumberModel的JSpinner的编辑器。classJSplitPane用于划分两个(并且只有两个)Components。class允许用户通过单击具有给定标题和/或图标的选项卡在一组组件之间切换的组件。classJTable用于显示和编辑常规的二维单元格表。classJTextArea是显示纯文本的多行区域。classJTextField是一个允许编辑单行文本的轻量级组件。class可以用图形表示的属性标记的文本组件。class两种状态按钮的实现。classJToolBar提供了一个组件,可用于显示常用的Action或控件。static class特定于工具栏的分隔符。class用于显示组件的“提示”。class将一组分层数据显示为大纲的控件。class您可以通过它查看基础信息的“视口”或“舷窗”。classJWindow是一个容器,可以显示在用户桌面的任何位置。javax.swing 中的字段声明为 Component修饰符和类型Field描述protected static final ComponentImageIcon.component已弃用。自 1.8protected ComponentJTable.editorComp如果正在编辑,则为处理编辑的Component。protected ComponentJRootPane.glassPane重写菜单栏和内容窗格的玻璃窗格,因此它可以拦截鼠标移动等。protected ComponentJLabel.labelFor该标签适用于的组件;如果标签不是组件的标签,则为 nullprotected ComponentJSplitPane.leftComponent左侧或顶部组件。protected ComponentJScrollPane.lowerLeft要显示在左下角的组件。protected ComponentScrollPaneLayout.lowerLeft要显示在左下角的组件。protected ComponentJScrollPane.lowerRight要显示在右下角的组件。protected ComponentScrollPaneLayout.lowerRight要显示在右下角的组件。protected ComponentJSplitPane.rightComponent右侧或底部组件。protected ComponentJScrollPane.upperLeft要显示在左上角的组件。protected ComponentScrollPaneLayout.upperLeft要显示在左上角的组件。protected ComponentJScrollPane.upperRight要显示在右上角的组件。protected ComponentScrollPaneLayout.upperRight要显示在右上角的组件。javax.swing 中返回 Component 的方法修饰符和类型方法描述将组件附加到此菜单的末尾。将指定的组件添加到此容器的给定位置。添加一个component,其选项卡标题默认为组件名称,这是调用component.getName的结果。在指定的选项卡索引处添加一个component,选项卡标题默认为组件名称。添加具有指定选项卡标题的component。protected ComponentScrollPaneLayout.addSingletonComponent(Component oldC, Component newC) 删除现有组件。MenuSelectionManager.componentForPoint(Component source, Point sourcePoint) 返回当前选定路径中包含 sourcePoint 的组件。protected ComponentJRootPane.createGlassPane()由构造方法调用以创建默认的glassPane。static ComponentBox.createGlue()创建一个不可见的“胶水”组件,该组件在可见组件具有最大宽度(对于水平框)或高度(对于垂直框)的 Box 中很有用。static ComponentBox.createHorizontalGlue()创建一个水平粘合组件。static ComponentBox.createHorizontalStrut(int width) 创建一个不可见的、固定宽度的组件。static ComponentBox.createRigidArea(Dimension d) 创建一个始终为指定大小的不可见组件。static ComponentBox.createVerticalGlue()创建垂直粘合组件。static ComponentBox.createVerticalStrut(int height) 创建一个不可见的、固定高度的组件。static ComponentSwingUtilities.findFocusOwner(Component c) 已弃用。从 1.4 开始,由KeyboardFocusManager.getFocusOwner()取代。JSplitPane.getBottomComponent()返回下方或分隔符右侧的组件。DefaultCellEditor.getComponent()返回对编辑器组件的引用。JMenu.getComponent()返回用于绘制此MenuElement的java.awt.Component。JMenuBar.getComponent()实施为MenuElement。JMenuItem.getComponent()返回用于绘制此对象的java.awt.Component。JPopupMenu.getComponent()返回此JPopupMenu组件。MenuElement.getComponent()此方法应返回用于绘制接收元素的java.awt.Component。Renderer.getComponent()返回用于呈现值的组件。TransferHandler.TransferSupport.getComponent()返回此传输的目标组件。DefaultFocusManager.getComponentAfter(Container aContainer, Component aComponent) 之后返回组件。LayoutFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。SortingFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。JTabbedPane.getComponentAt(int index) 返回位于index的组件。JMenuBar.getComponentAtIndex(int i) 已弃用。被getComponent(int i)取代JPopupMenu.getComponentAtIndex(int i) 已弃用。JToolBar.getComponentAtIndex(int i) 返回指定索引处的组件。DefaultFocusManager.getComponentBefore(Container aContainer, Component aComponent) 返回之前的组件。LayoutFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。SortingFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。JLayeredPane.getComponentsInLayer(int layer) 返回指定层中组件的数组。返回指定角的组件。返回指定角的Component。protected ComponentJTable.AccessibleJTable.AccessibleJTableCell.getCurrentComponent()获取表格单元格渲染器组件。static ComponentSwingUtilities.getDeepestComponentAt(Component parent, int x, int y) 返回包含位置x、y的parent的最深可见后代组件。SortingFocusTraversalPolicy.getDefaultComponent(Container aContainer) 返回要聚焦的默认组件。ComboBoxEditor.getEditorComponent()返回应添加到此编辑器的树层次结构中的组件JTable.getEditorComponent()返回正在处理编辑会话的组件。DefaultFocusManager.getFirstComponent(Container aContainer) 返回第一个组件。LayoutFocusTraversalPolicy.getFirstComponent(Container aContainer) 返回遍历循环中的第一个 Component。SortingFocusTraversalPolicy.getFirstComponent(Container aContainer) 返回遍历循环中的第一个 Component。JInternalFrame.getFocusOwner()如果此JInternalFrame处于活动状态,则返回具有焦点的孩子。JApplet.getGlassPane()已弃用,将被删除:此 API 元素可能会在未来版本中删除。返回此小程序的 glassPane 对象。JDialog.getGlassPane()返回此对话框的glassPane对象。JFrame.getGlassPane()返回此帧的glassPane对象。JInternalFrame.getGlassPane()返回此内部框架的玻璃窗格。JRootPane.getGlassPane()返回此JRootPane的当前玻璃窗格。JWindow.getGlassPane()返回此窗口的glassPane Component。RootPaneContainer.getGlassPane()返回玻璃面板。InternalFrameFocusTraversalPolicy.getInitialComponent(JInternalFrame frame) 返回首次选择 JInternalFrame 时应该接收焦点的组件。JPopupMenu.getInvoker()返回作为此弹出菜单的“调用者”的组件。JLabel.getLabelFor()获取正在标记的组件。DefaultFocusManager.getLastComponent(Container aContainer) 返回最后一个组件。LayoutFocusTraversalPolicy.getLastComponent(Container aContainer) 返回遍历循环中的最后一个 Component。SortingFocusTraversalPolicy.getLastComponent(Container aContainer) 返回遍历循环中的最后一个 Component。JSplitPane.getLeftComponent()返回分隔符左侧(或上方)的组件。DefaultListCellRenderer.getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) ListCellRenderer.getListCellRendererComponent(JList<? extends E> list, E value, int index, boolean isSelected, boolean cellHasFocus) 返回已配置为显示指定值的组件。JMenu.getMenuComponent(int n) 返回位置n处的组件。JMenu.getMenuComponents()返回菜单子组件的Component数组。JInternalFrame.getMostRecentFocusOwner()返回此JInternalFrame的子组件,当选择此JInternalFrame时,它将接收焦点。JComponent.getNextFocusableComponent()已弃用。从 1.4 开始,由FocusTraversalPolicy取代。JSplitPane.getRightComponent()返回分隔符右侧(或下方)的组件。static Component返回当前组件树的根组件。JTabbedPane.getSelectedComponent()返回当前为此选项卡窗格选择的组件。JTabbedPane.getTabComponentAt(int index) 返回位于index的选项卡组件。DefaultCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) 实现TableCellEditor接口。JSplitPane.getTopComponent()返回上方或分隔符左侧的组件。DefaultCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) 实现TreeCellEditor接口。static ComponentSwingUtilities.getUnwrappedView(JViewport viewport) 返回第一个JViewport的后代,它不是JLayer的实例。JViewport.getView()返回JViewport的一个孩子或null。JTable.prepareEditor(TableCellEditor editor, int row, int column) 通过在row、column处查询单元格的值和选择状态的数据模型来准备编辑器。JTable.prepareRenderer(TableCellRenderer renderer, int row, int column) 通过在row、column处查询单元格的值和选择状态的数据模型来准备渲染器。返回类型中包含 Component 类型参数的 javax.swing 中的方法修饰符和类型方法描述protected Comparator<? super Component>SortingFocusTraversalPolicy.getComparator()返回将用于在焦点遍历循环中对组件进行排序的比较器。JLayeredPane.getComponentToLayer()返回将组件映射到层的哈希表。javax.swing 中的方法,参数类型为 Component修饰符和类型方法描述protected boolean确定指定的Component作为新的焦点所有者是否是可接受的选择。protected boolean确定 Component 作为新的焦点所有者是否是可接受的选择。将组件附加到此菜单的末尾。将指定的组件添加到此容器的给定位置。添加一个component,其选项卡标题默认为组件名称,这是调用component.getName的结果。在指定的选项卡索引处添加一个component,选项卡标题默认为组件名称。void将component添加到选项卡式窗格。void在指定的选项卡索引处添加component。添加具有指定选项卡标题的component。GroupLayout.Group.addComponent(Component component) 添加一个Component到这个Group。GroupLayout.Group.addComponent(Component component, int min, int pref, int max) 将具有指定大小的Component添加到此Group。GroupLayout.ParallelGroup.addComponent(Component component) 添加一个Component到这个Group。GroupLayout.ParallelGroup.addComponent(Component component, int min, int pref, int max) 将具有指定大小的Component添加到此Group。GroupLayout.ParallelGroup.addComponent(Component component, GroupLayout.Alignment alignment) 使用指定的对齐方式向此ParallelGroup添加一个Component。GroupLayout.ParallelGroup.addComponent(Component component, GroupLayout.Alignment alignment, int min, int pref, int max) 使用指定的对齐方式和大小向此ParallelGroup添加一个Component。GroupLayout.SequentialGroup.addComponent(boolean useAsBaseline, Component component) 添加一个Component到这个Group。GroupLayout.SequentialGroup.addComponent(boolean useAsBaseline, Component component, int min, int pref, int max) 将具有指定大小的Component添加到此Group。GroupLayout.SequentialGroup.addComponent(Component component) 添加一个Component到这个Group。GroupLayout.SequentialGroup.addComponent(Component component, int min, int pref, int max) 将具有指定大小的Component添加到此Group。protected void将指定的组件添加到此容器的指定索引处,有关此方法的完整说明,请参阅Container.addImpl(Component, Object, int)。protected void如果指定的组件已经是它的子组件,那么我们什么都不用做——堆叠顺序对单元格渲染器组件无关紧要(CellRendererPane 无论如何都不绘制)。protected void已弃用,将被删除:此 API 元素可能会在未来版本中删除。添加指定的孩子Component。protected void将指定的组件添加到此容器的指定索引处。protected void添加指定的孩子Component。protected void添加指定的孩子Component。protected void添加指定的孩子Component。protected voidJLayer不支持此方法,总是抛出UnsupportedOperationExceptionprotected void重写以将玻璃组件的位置强制为零子组件。protected void将指定的组件添加到此拆分窗格。protected void如果添加了JButton,它最初设置为禁用。protected void设置JViewport的一个轻量级子项,可以是null。protected void添加指定的孩子Component。voidBoxLayout.addLayoutComponent(Component comp, Object constraints) 不被这个类使用。voidBoxLayout.addLayoutComponent(String name, Component comp) 不被这个类使用。voidGroupLayout.addLayoutComponent(Component component, Object constraints) Component已添加到父容器的通知。voidGroupLayout.addLayoutComponent(String name, Component component) Component已添加到父容器的通知。voidJRootPane.RootLayout.addLayoutComponent(Component comp, Object constraints) voidJRootPane.RootLayout.addLayoutComponent(String name, Component comp) voidJSpinner.DefaultEditor.addLayoutComponent(String name, Component child) 这个LayoutManager方法什么都不做。voidOverlayLayout.addLayoutComponent(Component comp, Object constraints) 使用指定的约束对象将指定的组件添加到布局中。voidOverlayLayout.addLayoutComponent(String name, Component comp) 将指定的组件添加到布局中。voidScrollPaneLayout.addLayoutComponent(String s, Component c) 将指定的组件添加到布局中。voidSpringLayout.addLayoutComponent(Component component, Object constraints) 如果constraints是SpringLayout.Constraints的实例,则将约束与指定组件相关联。voidSpringLayout.addLayoutComponent(String name, Component c) 没有效果,因为这个布局管理器不使用每个组件的字符串。voidViewportLayout.addLayoutComponent(String name, Component c) 将指定的组件添加到布局中。protected ComponentScrollPaneLayout.addSingletonComponent(Component oldC, Component newC) 删除现有组件。void添加一个component,由title表示,没有图标。void添加由title和/或icon表示的component,其中任何一个都可以是null。void添加component和tip由title和/或icon表示,其中任何一个都可以是null。booleanDefaultFocusManager.compareTabOrder(Component a, Component b) 按组件的焦点遍历循环顺序比较组件。MenuSelectionManager.componentForPoint(Component source, Point sourcePoint) 返回当前选定路径中包含 sourcePoint 的组件。static MouseEventSwingUtilities.convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination) 返回类似于sourceEvent的 MouseEvent,只是其 x 和 y 成员已转换为destination的坐标系。static PointSwingUtilities.convertPoint(Component source, int x, int y, Component destination) 将source坐标系中的点(x,y)转换为destination坐标系。static PointSwingUtilities.convertPoint(Component source, Point aPoint, Component destination) 将source坐标系中的aPoint转换为destination坐标系。static voidSwingUtilities.convertPointFromScreen(Point p, Component c) 将点从屏幕坐标转换为组件的坐标系static voidSwingUtilities.convertPointToScreen(Point p, Component c) 将点从组件的坐标系转换为屏幕坐标。static RectangleSwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination) 将source坐标系中的矩形aRectangle转换为destination坐标系。static JDialogJColorChooser.createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) 创建并返回一个新对话框,其中包含指定的ColorChooser窗格以及“确定”、“取消”和“重置”按钮。protected JDialogJFileChooser.createDialog(Component parent) 创建并返回一个新的JDialog包装this以parent为中心在parent的框架中。JOptionPane.createDialog(Component parentComponent, String title) 创建并返回一个新的JDialog包装this以parentComponent的parentComponent为中心。JOptionPane.createInternalFrame(Component parentComponent, String title) 创建并返回JInternalFrame的实例。static RepaintManagerRepaintManager.currentManager(Component c) 为给定组件的调用线程返回 RepaintManager。static ComponentSwingUtilities.findFocusOwner(Component c) 已弃用。从 1.4 开始,由KeyboardFocusManager.getFocusOwner()取代。static AccessibleSwingUtilities.getAccessibleAt(Component c, Point p) 返回包含在局部坐标Point的Accessible子节点(如果存在)。static AccessibleSwingUtilities.getAccessibleChild(Component c, int i) 返回对象的第 n 个可访问子对象。static intSwingUtilities.getAccessibleChildrenCount(Component c) 返回对象中可访问的子对象的数量。static intSwingUtilities.getAccessibleIndexInParent(Component c) 获取此对象在其可访问父对象中的索引。static AccessibleStateSetSwingUtilities.getAccessibleStateSet(Component c) 获取此对象的状态。static ContainerSwingUtilities.getAncestorNamed(String name, Component comp) 在组件层次结构中搜索comp上方的便捷方法,并返回它找到的name的第一个对象。static ContainerSwingUtilities.getAncestorOfClass(Class<?> c, Component comp) 在组件层次结构中搜索comp上方的便捷方法,并返回它找到的类c的第一个对象。DefaultFocusManager.getComponentAfter(Container aContainer, Component aComponent) 之后返回组件。LayoutFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。SortingFocusTraversalPolicy.getComponentAfter(Container aContainer, Component aComponent) 返回应在 aComponent 之后接收焦点的 Component。DefaultFocusManager.getComponentBefore(Container aContainer, Component aComponent) 返回之前的组件。LayoutFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。SortingFocusTraversalPolicy.getComponentBefore(Container aContainer, Component aComponent) 返回应在 aComponent 之前获得焦点的 Component。intJMenuBar.getComponentIndex(Component c) 返回指定组件的索引。intJPopupMenu.getComponentIndex(Component c) 返回指定组件的索引。intJToolBar.getComponentIndex(Component c) 返回指定组件的索引。SpringLayout.getConstraint(String edgeName, Component c) 返回控制组件指定边缘与其父级上边缘或左边缘之间距离的弹簧。SpringLayout.getConstraints(Component c) 返回指定组件的约束。static ComponentSwingUtilities.getDeepestComponentAt(Component parent, int x, int y) 返回包含位置x、y的parent的最深可见后代组件。static JDesktopPaneJOptionPane.getDesktopPaneForComponent(Component parentComponent) 返回指定组件的桌面窗格。static FrameJOptionPane.getFrameForComponent(Component parentComponent) 返回指定组件的Frame。intJLayeredPane.getIndexOf(Component c) 返回指定组件的索引。int返回指定组件的图层属性。static JLayeredPaneJLayeredPane.getLayeredPaneAbove(Component c) 返回包含指定组件的第一个 JLayeredPane 的便捷方法。static RectangleSwingUtilities.getLocalBounds(Component aComponent) 返回组件aComponent的矩形 (0,0,bounds.width,bounds.height)RepaintManager.getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight) 返回应该用作组件c的双缓冲区的屏幕外缓冲区。为包含组件contents的组件owner创建一个Popup。protected PopupPopupFactory.getPopup(Component owner, Component contents, int x, int y, boolean isHeavyWeightPopup) 为包含组件contents的组件owner创建一个Popup。intJLayeredPane.getPosition(Component c) 获取组件在其层中的相对位置。static Component返回当前组件树的根组件。static JRootPaneSwingUtilities.getRootPane(Component c) 如果 c 是 JRootPane 后代,则返回其 JRootPane 祖先。static ContainerSwingUtilities.getUnwrappedParent(Component component) 返回component的第一个祖先,它不是JLayer的实例。RepaintManager.getVolatileOffscreenBuffer(Component c, int proposedWidth, int proposedHeight) 返回一个易失性屏幕外缓冲区,该缓冲区应用作具有指定组件c的双缓冲区。static WindowSwingUtilities.getWindowAncestor(Component c) 返回c的第一个Window祖先,如果c不包含在Window中,则返回null。static Spring返回一个弹簧,其 minimum、preferred、maximum 和 value 属性由所提供组件的 minimumSize、preferredSize、maximumSize 和 size 属性的高度定义。intJTabbedPane.indexOfComponent(Component component) 返回指定组件的选项卡索引。intJTabbedPane.indexOfTabComponent(Component tabComponent) 返回指定选项卡组件的选项卡索引。void将指定的组件插入到菜单中的给定位置。voidJTextPane.insertComponent(Component c) 将组件插入到文档中以替换当前选定的内容。void在给定索引处为给定组件插入一个新选项卡,由给定标题和/或图标表示,其中任何一个都可以是null。booleanMenuSelectionManager.isComponentPartOfCurrentMenu(Component c) 如果c是当前使用的菜单的一部分,则返回真static booleanSwingUtilities.isDescendingFrom(Component a, Component b) 如果组件a是组件b的后代,则返回truestatic booleanJComponent.isLightweightComponent(Component c) 如果此组件是轻量级的,即如果它没有本机窗口系统对等项,则返回 true。booleanJMenu.isMenuComponent(Component c) 如果指定的组件存在于子菜单层次结构中,则返回 true。void强制指定组件沿指定轴具有相同的大小,而不管它们的首选大小、最小大小或最大大小如何。void强制指定的组件具有相同的大小,而不管它们的首选大小、最小大小或最大大小。voidJLayeredPane.moveToBack(Component c) 将组件移动到其当前层中组件的底部(位置 -1)。voidJLayeredPane.moveToFront(Component c) 将组件移动到其当前层中组件的顶部(位置 0)。voidCellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) 调用 this.paintComponent(g, c, p, x, y, w, h, false)。voidCellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate) 在图形对象 g 上绘制单元格渲染器组件 c。voidCellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r) 调用 this.paintComponent(g, c, p, rx, ry, r.width, r.height) 其中r是输入Rectangle参数。static voidSwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) 将组件绘制到指定的Graphics。static voidSwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r) 将组件绘制到指定的Graphics。void在指定位置绘制图标。void绘制图标。voidLookAndFeel.provideErrorFeedback(Component component) 当用户尝试无效操作时调用,例如粘贴到具有焦点的不可编辑的JTextField中。voidSpringLayout.putConstraint(String e1, Component c1, int pad, String e2, Component c2) 将组件c1的边e1链接到组件c2的边e2,边之间的距离固定。void将组件c1的边e1链接到组件c2的边e2。void已弃用,将被删除:此 API 元素可能会在未来版本中删除。从容器中移除指定的组件。void从容器中移除指定的组件。void从容器中移除指定的组件。void从容器中移除指定的组件。void从此菜单中删除组件c。void从窗格中删除子组件component。void从JTabbedPane中删除指定的Component。void删除Viewport的一个轻量级子项。void从容器中移除指定的组件。voidBoxLayout.removeLayoutComponent(Component comp) 不被这个类使用。voidGroupLayout.removeLayoutComponent(Component component) Component已从父容器中删除的通知。voidJRootPane.RootLayout.removeLayoutComponent(Component comp) voidJSpinner.DefaultEditor.removeLayoutComponent(Component child) 这个LayoutManager方法什么都不做。voidOverlayLayout.removeLayoutComponent(Component comp) 从布局中移除指定的组件。voidScrollPaneLayout.removeLayoutComponent(Component c) 从布局中移除指定的组件。voidSpringLayout.removeLayoutComponent(Component c) 删除与指定组件关联的约束。voidViewportLayout.removeLayoutComponent(Component c) 从布局中移除指定的组件。void用新组件替换现有组件。voidJSplitPane.setBottomComponent(Component comp) 将组件设置在分隔线下方或右侧。voidJScrollPane.setColumnHeaderView(Component view) 如有必要,创建列标题视口,设置其视图,然后将列标题视口添加到滚动窗格。voidJTabbedPane.setComponentAt(int index, Component component) 将位于index的组件设置为component。voidJDesktopPane.setComponentZOrder(Component comp, int index) 将指定组件移动到容器中指定的 z 顺序索引。void如果有空间,添加一个将出现在滚动窗格角落之一的子级。voidJApplet.setGlassPane(Component glassPane) 已弃用,将被删除:此 API 元素可能会在未来版本中删除。设置 glassPane 属性。voidJDialog.setGlassPane(Component glassPane) 设置glassPane属性。voidJFrame.setGlassPane(Component glassPane) 设置glassPane属性。voidJInternalFrame.setGlassPane(Component glass) 设置此JInternalFrame的glassPane属性。voidJRootPane.setGlassPane(Component glass) 将指定的Component设置为此根窗格的玻璃窗格。voidJWindow.setGlassPane(Component glassPane) 设置glassPane属性。voidRootPaneContainer.setGlassPane(Component glassPane) glassPane 始终是 rootPane 的第一个子级,rootPanes 布局管理器确保它始终与 rootPane 一样大。voidGroupLayout.setHonorsVisibility(Component component, Boolean honorsVisibility) 设置是否考虑组件的可见性来调整大小和定位。voidJPopupMenu.setInvoker(Component invoker) 设置此弹出菜单的调用程序——要在其中显示弹出菜单菜单的组件。voidJLabel.setLabelFor(Component c) 设置这是标签的组件。void在指定组件上设置层属性,使其成为该层中的最底部组件。void设置指定组件的图层属性,并设置其在该图层中的位置。voidJSplitPane.setLeftComponent(Component comp) 将组件设置到分隔线的左侧(或上方)。voidJComponent.setNextFocusableComponent(Component aComponent) 已弃用。从 1.4 开始,由FocusTraversalPolicy取代voidJLayeredPane.setPosition(Component c, int position) 将组件移动到其当前层内的position,其中 0 是层内的最顶部位置,-1 是最底部位置。voidJSplitPane.setRightComponent(Component comp) 将组件设置到分隔线的右侧(或下方)。voidJScrollPane.setRowHeaderView(Component view) 如有必要,创建行标题视口,设置其视图,然后将行标题视口添加到滚动窗格。voidJMenuBar.setSelected(Component sel) 设置当前选择的组件,产生对选择模型的改变。voidJPopupMenu.setSelected(Component sel) 设置当前选择的组件,这将导致选择模型发生变化。voidJTabbedPane.setSelectedComponent(Component c) 为此选项卡式窗格设置所选组件。voidJTabbedPane.setTabComponentAt(int index, Component component) 设置负责呈现指定选项卡标题的组件。voidJSplitPane.setTopComponent(Component comp) 将组件设置在分隔线上方或左侧。void设置JViewport的一个轻量级子项 (view),可以是null。voidJScrollPane.setViewportView(Component view) 如有必要,创建视口,然后设置其视图。void在组件调用程序的坐标空间中的 x,y 位置显示弹出菜单。static intJOptionPane.showConfirmDialog(Component parentComponent, Object message) 弹出一个带有选项的对话框是的, 不和取消;标题,选择一个选项.static intJOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType) 打开一个对话框,其中选项的数量由optionType参数确定。static intJOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) 调出一个对话框,其中选项的数量由optionType参数确定,其中messageType参数确定要显示的图标。static intJOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) 打开一个带有指定图标的对话框,其中选项的数量由optionType参数确定。static ColorJColorChooser.showDialog(Component component, String title, Color initialColor) 显示模态颜色选择器对话框并阻塞,直到对话框被隐藏。static ColorJColorChooser.showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) 显示模态颜色选择器对话框并阻塞,直到对话框被隐藏。intJFileChooser.showDialog(Component parent, String approveButtonText) 弹出带有自定义批准按钮的自定义文件选择器对话框。static StringJOptionPane.showInputDialog(Component parentComponent, Object message) 显示一个问题消息对话框,请求parentComponent的父级用户输入。static StringJOptionPane.showInputDialog(Component parentComponent, Object message, Object initialSelectionValue) 显示一个问题消息对话框,请求用户输入并作为parentComponent的父级。static StringJOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType) 显示一个对话框,请求父级为parentComponent的用户输入,该对话框的标题为title,消息类型为messageType。static ObjectJOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) 提示用户在阻塞对话框中输入,其中可以指定初始选择、可能的选择和所有其他选项。static intJOptionPane.showInternalConfirmDialog(Component parentComponent, Object message) 打开带有选项的内部对话框面板是的, 不和取消;标题,选择一个选项.static intJOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType) 打开一个内部对话框面板,其中选项的数量由optionType参数确定。static intJOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) 打开一个内部对话框面板,其中选项的数量由optionType参数确定,其中messageType参数确定要显示的图标。static intJOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) 打开一个带有指定图标的内部对话框面板,其中选项的数量由optionType参数确定。static StringJOptionPane.showInternalInputDialog(Component parentComponent, Object message) 显示一个内部问题消息对话框,请求parentComponent的父级用户输入。static StringJOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType) 显示一个内部对话框,请求父级为parentComponent的用户输入,该对话框的标题为title,消息类型为messageType。static ObjectJOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) 提示用户在阻塞的内部对话框中输入,其中可以指定初始选择、可能的选择和所有其他选项。static voidJOptionPane.showInternalMessageDialog(Component parentComponent, Object message) 打开一个内部确认对话框面板。static voidJOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType) 打开一个内部对话框面板,该面板使用由messageType参数确定的默认图标显示消息。static voidJOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) 打开一个内部对话框面板,显示一条消息,指定所有参数。static intJOptionPane.showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) 调出一个带有指定图标的内部对话框面板,其中初始选择由initialValue参数决定,选择的数量由optionType参数决定。static voidJOptionPane.showMessageDialog(Component parentComponent, Object message) 打开标题为“消息”的信息消息对话框。static voidJOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType) 使用由messageType参数确定的默认图标调出一个显示消息的对话框。static voidJOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) 打开一个显示消息的对话框,指定所有参数。intJFileChooser.showOpenDialog(Component parent) 弹出“打开文件”文件选择器对话框。static intJOptionPane.showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) 调出一个带有指定图标的对话框,其中初始选择由initialValue参数决定,选择的数量由optionType参数决定。intJFileChooser.showSaveDialog(Component parent) 弹出“保存文件”文件选择器对话框。static voidSwingUtilities.updateComponentTreeUI(Component c) 一个简单的外观变化:要求树中的每个节点updateUI()——也就是说,用当前的外观初始化它的 UI 属性。static Spring返回一个弹簧,其 minimum、preferred、maximum 和 value 属性由所提供组件的 minimumSize、preferredSize、maximumSize 和 size 属性的宽度定义。static WindowSwingUtilities.windowForComponent(Component c) 返回c的第一个Window祖先,如果c不包含在Window中,则返回null。javax.swing 中的方法参数,类型参数为 Component修饰符和类型方法描述protected voidSortingFocusTraversalPolicy.setComparator(Comparator<? super Component> comparator) 设置将用于在焦点遍历循环中对组件进行排序的比较器。javax.swing 中的构造函数,参数类型为 Component修饰符构造方法描述为组件c创建一个具有合适的x、y、width和height弹簧的Constraints对象。JScrollPane(Component view) 创建一个JScrollPane来显示指定组件的内容,只要组件的内容大于视图,水平和垂直滚动条就会出现。JScrollPane(Component view, int vsbPolicy, int hsbPolicy) 创建一个JScrollPane在视口中显示视图组件,其视图位置可以用一对滚动条控制。JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent) 创建具有指定方向和重绘样式以及指定组件的新JSplitPane。JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent) 创建具有指定方向和指定组件的新JSplitPane。protected为包含组件contents的组件owner创建一个Popup。ProgressMonitor(Component parentComponent, Object message, String note, int min, int max) 构造一个显示进度的图形对象,通常是在过程接近完成时填充一个矩形条。ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in) 构造一个对象来监视输入流的进度。TransferSupport(Component component, Transferable transferable) 为给定组件和Transferable创建一个带有isDrop()false的TransferSupport。javax.swing 中的构造函数参数,类型参数为 Component修饰符构造方法描述SortingFocusTraversalPolicy(Comparator<? super Component> comparator) 使用指定的 Comparator 构造一个 SortingFocusTraversalPolicy。 -
Component 在 javax.swing.border 中的用法
javax.swing.border 中的方法,参数类型为 Component修饰符和类型方法描述intAbstractBorder.getBaseline(Component c, int width, int height) 返回基线。intTitledBorder.getBaseline(Component c, int width, int height) 返回基线。AbstractBorder.getBaselineResizeBehavior(Component c) 返回一个枚举,指示组件的基线如何随着大小的变化而变化。TitledBorder.getBaselineResizeBehavior(Component c) 返回一个枚举,指示边框的基线如何随着大小的变化而变化。AbstractBorder.getBorderInsets(Component c) 此默认实现返回一个新的Insets对象,该对象由AbstractBorder.getBorderInsets(Component,Insets)方法初始化。AbstractBorder.getBorderInsets(Component c, Insets insets) 使用此 Border 的当前 Insets 重新初始化 insets 参数。BevelBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。Border.getBorderInsets(Component c) 返回边框的insets。CompoundBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。EmptyBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。EtchedBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。LineBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。MatteBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。SoftBevelBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。StrokeBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前insets重新初始化insets参数。TitledBorder.getBorderInsets(Component c, Insets insets) 使用此边框的当前 Insets 重新初始化 insets 参数。protected Font返回标题边框的默认字体。EtchedBorder.getHighlightColor(Component c) 返回在指定组件上呈现时蚀刻边框的突出显示颜色。BevelBorder.getHighlightInnerColor(Component c) 返回在指定组件上渲染时斜角边框的内部高亮颜色。BevelBorder.getHighlightOuterColor(Component c) 返回在指定组件上呈现时斜角边框的外部突出显示颜色。AbstractBorder.getInteriorRectangle(Component c, int x, int y, int width, int height) 此便捷方法调用静态方法。static RectangleAbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) 使用参数减去边框的insets返回一个矩形。TitledBorder.getMinimumSize(Component c) 返回此边框为了完全显示边框和标题所需的最小尺寸。EtchedBorder.getShadowColor(Component c) 返回在指定组件上呈现时蚀刻边框的阴影颜色。BevelBorder.getShadowInnerColor(Component c) 返回在指定组件上呈现时斜角边框的内部阴影颜色。BevelBorder.getShadowOuterColor(Component c) 返回在指定组件上渲染时斜角边框的外部阴影颜色。voidAbstractBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 此默认实现不进行绘制。voidBevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。voidBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。voidCompoundBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 通过使用指定的位置和大小绘制外边框来绘制复合边框,然后在指定的位置和大小绘制内边框,偏移量为外边框的insets。voidEmptyBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 默认不绘制。voidEtchedBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。voidLineBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。voidMatteBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 绘制无光泽边框。voidSoftBevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。voidStrokeBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。voidTitledBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) 使用指定的位置和大小绘制指定组件的边框。protected voidBevelBorder.paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height) 为具有指定位置和大小的指定组件绘制降低的斜面。protected voidBevelBorder.paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height) 为具有指定位置和大小的指定组件绘制凸起的斜面。 -
Component 在 javax.swing.colorchooser 中的用法
-
Component 在 javax.swing.event 中的用法
javax.swing.event 中的构造函数,参数类型为 Component修饰符构造方法描述MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m) 构造一个 MenuDragMouseEvent 对象。MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m) 构造一个 MenuDragMouseEvent 对象。MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m) 构造一个 MenuKeyEvent 对象。 -
Component 在 javax.swing.plaf 中的用法
在 javax.swing.plaf 中具有类型参数为 Component 的类javax.swing.plaf 中的方法,参数类型为 Component修饰符和类型方法描述BorderUIResource.getBorderInsets(Component c) voidBorderUIResource.paintBorder(Component c, Graphics g, int x, int y, int width, int height) void -
Component 在 javax.swing.plaf.basic 中的用法
修饰符和类型类描述classJButton 对象,它在其中一个主要方向上绘制一个按比例缩放的箭头。class组合框渲染器static class实现 UIResource 的 BasicComboBoxRenderer 的子类。class这是ComboPopup接口的基本实现。class管理基本标题栏的类class此类应被视为“受保护”的内部类。classBasicSplitPaneUI 使用的分隔线。protected class拖动JToolBar时出现的窗口。javax.swing.plaf.basic 中的字段声明为 Component修饰符和类型Field描述protected Component[]BasicSplitPaneUI.BasicHorizontalLayoutManager.components组件。protected ComponentBasicTreeUI.MouseInputHandler.destination接收所有事件的目的地。protected ComponentBasicTreeUI.editingComponent编辑时,这将是进行实际编辑的组件。protected ComponentBasicComboBoxUI.editorComboBoxEditor用于编辑的组件。protected ComponentBasicSplitPaneDivider.hiddenDivider用于非连续布局模式的分隔线。protected ComponentBasicOptionPaneUI.initialFocusComponent在使用 selectInitialValue 发送消息时接收焦点的组件。protected ComponentBasicSplitPaneUI.nonContinuousLayoutDivider使用非连续布局时分隔线阴影的实例。protected ComponentBasicTreeUI.MouseInputHandler.source事件的来源。BasicMenuUI.ChangeHandler.wasFocused聚焦的组件。javax.swing.plaf.basic 中返回 Component 的方法修饰符和类型方法描述protected ComponentBasicSplitPaneUI.createDefaultNonContinuousLayoutDivider()返回默认的非连续布局分隔符,它是用深灰色填充背景的Canvas实例。protected ComponentBasicSpinnerUI.createNextButton()创建一个增量按钮,即用spinner.getNextValue返回的对象替换微调器值的组件。protected ComponentBasicSpinnerUI.createPreviousButton()创建一个递减按钮,即用spinner.getPreviousValue返回的对象替换微调器值的组件。BasicComboBoxEditor.getEditorComponent()protected ComponentBasicSliderUI.getHighestValueLabel()返回对应于标签表中最低滑块值的标签。BasicComboBoxRenderer.getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) protected ComponentBasicSliderUI.getLowestValueLabel()返回与标签表中最高滑块值对应的标签。BasicSplitPaneUI.getNonContinuousLayoutDivider()返回当JSplitPane配置为不连续布局时使用的分隔符。protected ComponentBasicTabbedPaneUI.getVisibleComponent()返回可见组件。javax.swing.plaf.basic 中的方法,参数类型为 Component修饰符和类型方法描述voidBasicComboBoxUI.ComboBoxLayoutManager.addLayoutComponent(String name, Component comp) voidBasicInternalFrameTitlePane.TitlePaneLayout.addLayoutComponent(String name, Component c) voidBasicInternalFrameUI.InternalFrameLayout.addLayoutComponent(String name, Component c) 如果布局管理器使用每个组件字符串,则将组件comp添加到布局中,将其与name指定的字符串相关联。voidBasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(String string, Component comp) voidBasicScrollBarUI.addLayoutComponent(String name, Component child) voidBasicSplitPaneDivider.DividerLayout.addLayoutComponent(String string, Component c) voidBasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(Component comp, Object constraints) 使用指定的约束对象将指定的组件添加到布局中。voidBasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(String place, Component component) 在适当的位置添加组件。voidBasicTabbedPaneUI.TabbedPaneLayout.addLayoutComponent(String name, Component comp) boolean如果JToolBar可以停靠在给定位置,则返回true。protected voidBasicTreeUI.drawCentered(Component c, Graphics graphics, Icon icon, int x, int y) 以 (x,y) 为中心绘制icon。BasicBorders.SplitPaneBorder.getBorderInsets(Component c) protected intBasicSplitPaneUI.BasicHorizontalLayoutManager.getPreferredSizeOfComponent(Component c) 返回传入的组件首选大小的宽度。protected DimensionBasicComboBoxUI.getSizeForComponent(Component comp) 返回组件用作单元格渲染器时的大小。protected intBasicSplitPaneUI.BasicHorizontalLayoutManager.getSizeOfComponent(Component c) 返回传入组件的宽度。protected voidBasicSpinnerUI.installNextButtonListeners(Component c) 在下一个按钮c上安装必要的监听器,以更新JSpinner以响应用户手势。protected voidBasicSpinnerUI.installPreviousButtonListeners(Component c) 在前一个按钮c上安装必要的监听器,以更新JSpinner以响应用户手势。voidBasicBorders.SplitPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) protected voidBasicSliderUI.paintHorizontalLabel(Graphics g, int value, Component label) 为标签表中的每个标签调用。protected voidBasicSliderUI.paintVerticalLabel(Graphics g, int value, Component label) 为标签表中的每个标签调用。voidBasicComboBoxUI.ComboBoxLayoutManager.removeLayoutComponent(Component comp) voidBasicInternalFrameTitlePane.TitlePaneLayout.removeLayoutComponent(Component c) voidBasicInternalFrameUI.InternalFrameLayout.removeLayoutComponent(Component c) 从布局中移除指定的组件。voidBasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(Component c) voidBasicScrollBarUI.removeLayoutComponent(Component child) voidBasicSplitPaneDivider.DividerLayout.removeLayoutComponent(Component c) voidBasicSplitPaneUI.BasicHorizontalLayoutManager.removeLayoutComponent(Component component) 从我们的知识中删除指定的组件。voidBasicTabbedPaneUI.TabbedPaneLayout.removeLayoutComponent(Component comp) protected voidBasicToolBarUI.setBorderToNonRollover(Component c) 将组件的边框设置为具有由BasicToolBarUI.createNonRolloverBorder()方法创建的非翻转边框。protected voidBasicToolBarUI.setBorderToNormal(Component c) 将组件的边框设置为具有正常边框。protected voidBasicToolBarUI.setBorderToRollover(Component c) 将组件的边框设置为具有由BasicToolBarUI.createRolloverBorder()方法创建的翻转边框。protected voidBasicSplitPaneUI.BasicHorizontalLayoutManager.setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) 将组件c的宽度设置为size,将其 x 位置放置在location,将 y 放置在insets.top并将高度放置在containerSize.height减去顶部和底部insets。protected voidBasicSplitPaneUI.setNonContinuousLayoutDivider(Component newDivider) 设置当JSplitPane配置为不连续布局时要使用的分隔符。protected voidBasicSplitPaneUI.setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes) 设置要使用的分频器。protected voidBasicTabbedPaneUI.setVisibleComponent(Component component) 设置可见组件。javax.swing.plaf.basic 中的构造函数,参数类型为 Component修饰符构造方法描述MouseInputHandler(Component source, Component destination, MouseEvent event) 构造一个MouseInputHandler新实例 -
Component 在 javax.swing.plaf.metal 中的用法
修饰符和类型类描述class帮助 MetalComboBoxUI 的 JButton 子类class已弃用。从 Java 2 平台 v1.4 开始。protected class已弃用。从 JDK 版本 9 开始。class呈现不同的字体大小和样式。class管理 JLF 标题栏的类class金属滚动条箭头的 JButton 对象。javax.swing.plaf.metal 中的方法,参数类型为 Component修饰符和类型方法描述protected void油漆MetalCheckBoxIcon。voidvoid为voidvoidvoidvoidvoid绘制TreeControlIcon。voidMetalLookAndFeel.provideErrorFeedback(Component component) 当用户尝试无效操作时调用,例如粘贴到具有焦点的不可编辑的JTextField中。 -
Component 在 javax.swing.plaf.synth 中的用法
javax.swing.plaf.synth 中的方法,参数类型为 Component修饰符和类型方法描述default voidprotected voidSynthToolBarUI.setBorderToNonRollover(Component c) 此实现不执行任何操作,因为JToolBar类的rollover属性未在 Synth 外观中使用。protected voidSynthToolBarUI.setBorderToNormal(Component c) 此实现不执行任何操作,因为JToolBar类的rollover属性未在 Synth 外观中使用。protected voidSynthToolBarUI.setBorderToRollover(Component c) 此实现不执行任何操作,因为JToolBar类的rollover属性未在 Synth 外观中使用。static voidSynthLookAndFeel.updateStyles(Component c) 更新与c及其所有子项关联的样式。 -
Component 在 javax.swing.table 中的用法
javax.swing.table 中 Component 的子类修饰符和类型类描述class用于在JTable中呈现(显示)单个单元格的标准类。static class实现UIResource的DefaultTableCellRenderer的子类。class这是管理JTable标头的对象。javax.swing.table 中返回 Component 的方法修饰符和类型方法描述TableCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) 为编辑器设置一个初始的value。DefaultTableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) 返回默认的表格单元格渲染器。TableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) 返回用于绘制单元格的组件。 -
Component 在 javax.swing.text 中的用法
javax.swing.text 中 Component 的子类javax.swing.text 中返回 Component 的方法修饰符和类型方法描述protected ComponentComponentView.createComponent()创建与此视图关联的组件。final ComponentComponentView.getComponent()获取与视图关联的组件。static ComponentStyleConstants.getComponent(AttributeSet a) 从属性列表中获取组件设置。javax.swing.text 中的方法,参数类型为 Component修饰符和类型方法描述protected voidPlainView.damageLineRange(int line0, int line1, Shape a, Component host) 重新绘制给定的线范围。static voidStyleConstants.setComponent(MutableAttributeSet a, Component c) 设置组件属性。 -
Component 在 javax.swing.text.html 中的用法
javax.swing.text.html 中返回 Component 的方法修饰符和类型方法描述protected ComponentFormView.createComponent()创建组件。protected ComponentObjectView.createComponent()创建组件。 -
Component 在 javax.swing.tree 中的用法
javax.swing.tree 中 Component 的子类修饰符和类型类描述classTextField在没有提供编辑器时使用。class容器负责放置editingComponent。class显示树中的条目。javax.swing.tree 中的字段声明为 Component修饰符和类型Field描述protected ComponentDefaultTreeCellEditor.editingComponent编辑中使用的组件,从editingContainer获得。javax.swing.tree 中返回 Component 的方法修饰符和类型方法描述DefaultTreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) 配置编辑器。TreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) 设置初始value给编辑。DefaultTreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) 根据传入的组件配置渲染器。TreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) 将当前树单元格的值设置为value。