![]() getIcon ()) ītToolTipText(NbBundle.getMessage(HtmlBrowser. class, "CTL_Reload" )) //NOI18N tFocusPainted( false ) ītRolloverIcon(ImageUtilities.loadImageIcon( "org/openide/resources/html/stop_hover.png", true )) //NOI18N tDisabledIcon(ImageUtilities.loadImageIcon( "org/openide/resources/html/stop.png", true )) //NOI18N tSelectedIcon(bStop. You can vote up the ones you like or vote down the ones you dont like, and go to the. getIcon ()) ītToolTipText(NbBundle.getMessage(HtmlBrowser. The following examples show how to use (). ![]() class, "CTL_Forward" )) //NOI18N tRolloverIcon(ImageUtilities.loadImageIcon( "org/openide/resources/html/refresh_hover.png", true )) //NOI18N tDisabledIcon(ImageUtilities.loadImageIcon( "org/openide/resources/html/refresh.png", true )) //NOI18N tSelectedIcon(bReload. Java JButton dispatchEvent(AWTEvent e) Dispatches an event to this component or one of its sub components. Java JButton getLocationOnScreen() Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's. getIcon ()) ītToolTipText(NbBundle.getMessage(HtmlBrowser. Java JButton setSelectedIcon(Icon selectedIcon) Sets the selected icon for the button. Following is the output of the program: Code description: setIcon (Icon): Above method sets the specified Icon on the button. This program sets the icon on the button in Java Swing. Java JButton addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. Java JButton setAction(Action a) Sets the Action. Java JButton setIcon(Icon defaultIcon) Sets the button's default icon. class, "CTL_Back" )) //NOI18N tRolloverIcon(ImageUtilities.loadImageIcon( "org/openide/resources/html/forward_hover.png", true )) //NOI18N tDisabledIcon(ImageUtilities.loadImageIcon( "org/openide/resources/html/forward_disabled.png", true )) //NOI18N tSelectedIcon(bForward. This section illustrates you how to show the icon on the button in Java Swing. This icon is also used as the 'pressed' and 'disabled' icon if there is no explicitly set pressed icon. Java JButton setToolTipText(String text) Registers the text to display in a tool tip. Gets the value of the defaultButton property, which if true means that this button is the current default button for its JRootPane. Returns a string that specifies the name of the L
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |