JXLabel extends JLabel implements BackgroundPaintable { public final Painter getForegroundPainter() { return foregroundPainter; } JXLabel();  JXLabel(Icon image);  JXLabel(Icon image, int horizontalAlignment);  JXLabel(String text);  JXLabel(String text, Icon image, int horizontalAlignment);  JXLabel(String text, int horizontalAlignment); final Painter getForegroundPainter(); @Override @SuppressWarnings("deprecation") void reshape(int x, int y, int w, int h); void setForegroundPainter(Painter painter); @Override void setBackgroundPainter(Painter p); @Override final Painter getBackgroundPainter(); double getTextRotation(); @Override Dimension getPreferredSize(); int getMaxLineSpan(); void setMaxLineSpan(int maxLineSpan); void setTextRotation(double textOrientation); void setLineWrap(boolean b); boolean isLineWrap(); TextAlignment getTextAlignment(); void setTextAlignment(TextAlignment alignment); @Override boolean isPaintBorderInsets(); @Override boolean isOpaque(); @Override void setPaintBorderInsets(boolean paintBorderInsets); @Override void repaint(); @Override void repaint(int x, int y, int width, int height); @Override void repaint(long tm); @Override void repaint(long tm, int x, int y, int width, int height); @Override int getHeight(); @Override int getWidth(); static final double NORMAL; static final double INVERTED; static final double VERTICAL_LEFT; static final double VERTICAL_RIGHT; public boolean painted; }
@Test public void testDefaultForegroundNotAntialiasing() { JXLabel label = new JXLabel(); AbstractPainter<?> painter = (AbstractPainter<?>) label.getForegroundPainter(); assertFalse("foreground painter must not be antialiasing", painter.isAntialiasing()); }