Public void setHorizontalTextPosition(int textPosition) SwingConstants.TOP, SwingConstants.BOTTOM, SwingConstants.CENTER Set the vertical alignment of icon and text, Public void setVerticalAlignment(int alignment) SwingConstants.RIGHT, SwingConstants.LEFT, SwingConstants.CENTER Set the horizontal alignment of icon and text Public void setHorizontalAlignment(int alignment) Set the button's default icon (you can have different icons for "pressed" and "disabled" states) Swing's JLabel and buttons ( AbstractButton subclasses): support both text and icon, which can be specified in the constructor or via the setters. Sets the tool-tip message, to be displayed when the mouse-pointer pauses over the component. Public void setToolTipText(String toolTipMsg) Most of the JComponents have default of true, except JLabel. otherwise, enable transparent background. If true (opaque), fill the background with background color Sets the preferred, maximum or minimum size of this component. Public void setMinimumSize(Dimension dim) Public void setMaximumSize(Dimension dim) Public void setPreferredSize(Dimension dim) Sets the foreground (text) color of this component Sets the background color of this component
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |