String layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int rizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
这两个方法用于重新布局swing按钮和标签上的文本和图标.
void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)