正在加载图片...
I javax. swing JComponent javax.swing. AbstractButton etAction Commando: String Retums the action command of this button etActionCommand(s: String): void Sets a new action command for this button tTextO: String Retums the buttons text (i.e the text label on the button) Text( text: String): void Sets the button's text getlcon(: javax. swing. Icon Retums the button's default icon Iconicon: Icon): void Sets the buttons default icon. This icon is also used as the"pressed"and sabled"icon if there is no explicitly set pressed icon. t Pressedlcon(: javax. swing. Icon eturms the pressed icon( displayed when the button is pressed) et Pressedlcon( pressedlcon: Icon): void Sets a pressed icon for the button. onO): javax. swing. Icon Returns the rollover icon(displayed when the mouse is over the button) etRolloverlcon(pressedlcon: Icon): Sets a rollover icon for the button cO: Int Retums the mnemonic key value of this button. You can select the button by pressing the alt key and the mnemonic key at the same time etMnemonic(mnemonic: int ) void Sets a mnemonic key value of this button. t horizontalAlignmento: int Retums the horizontal alignment of the icon and text on the button. et HorizontalAlignment(alignment: in ): Sets the horizontal alignment of the icon and text.(default: CENTER) ethorizontal Text Position(: int Returns the horizontal text position relative to the icon on the button etHorizontalText Position(position: int) Sets the horizontal text position of the text relative to the icon(default RIGHT get VerticalAlignment(: int Retums the vertical alignment of the icon and text on the button tVerticalAlignment(vAlignment: int): Sets the vertical alignment of the icon and text. (default: CENTER) Retums the vertical text position relative to the icon on the button et VerticalTextPosition(position: int): Sets the vertical text position of the text relative to the icon(default: isBorderPaintedo: Boolean Indicates whether the border of the button is painted et Border Painted(b: boolean ) void Draws or hides the border of the button. By default, a regular buttons border is painted, but the border for a check box and a radio button is etlconText Gapo: int eturms the gap between the text and the icon on the button. (DK 1.4) etlconText Gap(icon TextGap: int): void Sets a gap between the text and the icon on the button. (JDK 1.4) is Selected: boolean Retums the state of the button True if the check box or radio button is Selected (b: boolean ) void Sets the state for the check box or radio buttonLiang,Introduction to Java Programming,revised by Dai-kaiyu 8 javax.swing.AbstractButton +getActionCommand(): String +setActionCommand(s: String): void +getText(): String +setText(text: String): void +getIcon(): javax.swing.Icon +setIcon(icon: Icon): void +getPressedIcon(): javax.swing.Icon +setPressedIcon(pressedIcon: Icon): void +getRolloverIcon(): javax.swing.Icon +setRolloverIcon(pressedIcon: Icon): void +getMnemonic(): int +setMnemonic(mnemonic: int): void +getHorizontalAlignment(): int +setHorizontalAlignment(alignment: int): void +getHorizontalTextPosition(): int +setHorizontalTextPosition(position: int): void +getVerticalAlignment(): int +setVerticalAlignment(vAlignment: int): void +getVerticalTextPosition(): int +setVerticalTextPosition(position: int) : void +isBorderPainted(): Boolean +setBorderPainted(b: boolean): void +getIconTextGap(): int +setIconTextGap(iconTextGap: int): void +isSelected(): boolean +setSelected(b: boolean): void Returns the action command of this button. Sets a new action command for this button. Returns the button’s text (i.e., the text label on the button). Sets the button’s text. Returns the button’s default icon. Sets the button's default icon. This icon is also used as the "pressed" and "disabled" icon if there is no explicitly set pressed icon. Returns the pressed icon (displayed when the button is pressed). Sets a pressed icon for the button. Returns the rollover icon (displayed when the mouse is over the button). Sets a rollover icon for the button. Returns the mnemonic key value of this button. You can select the button by pressing the ALT key and the mnemonic key at the same time. Sets a mnemonic key value of this button. Returns the horizontal alignment of the icon and text on the button. Sets the horizontal alignment of the icon and text. (default: CENTER) Returns the horizontal text position relative to the icon on the button. Sets the horizontal text position of the text relative to the icon. (default: RIGHT) Returns the vertical alignment of the icon and text on the button. Sets the vertical alignment of the icon and text. (default: CENTER). Returns the vertical text position relative to the icon on the button. Sets the vertical text position of the text relative to the icon. (default: CENTER) Indicates whether the border of the button is painted. Draws or hides the border of the button. By default, a regular button’s border is painted, but the border for a check box and a radio button is not painted. Returns the gap between the text and the icon on the button. (JDK 1.4) Sets a gap between the text and the icon on the button. (JDK 1.4) Returns the state of the button. True if the check box or radio button is selected, false if it's not. Sets the state for the check box or radio button. javax.swing.JComponent
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有