/** * Convenience constructor for Text Components */ public LineNumber(JComponent component) { if (component == null) { setFont( DEFAULT_FONT ); this.component = this; } else { setFont( component.getFont() ); this.component = component; } setBackground( DEFAULT_BACKGROUND ); setForeground( DEFAULT_FOREGROUND ); setPreferredWidth( 99 ); }
/** * Convenience constructor for Text Components */ public LineNumber(JComponent component) { if (component == null) { setFont( DEFAULT_FONT ); this.component = this; } else { setFont( component.getFont() ); this.component = component; } setBackground( DEFAULT_BACKGROUND ); setForeground( DEFAULT_FOREGROUND ); setPreferredWidth( 99 ); }